home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 118447451

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/issues/453#issuecomment-118447451 https://api.github.com/repos/pydata/xarray/issues/453 118447451 MDEyOklzc3VlQ29tbWVudDExODQ0NzQ1MQ== 1217238 2015-07-04T01:09:10Z 2015-07-04T01:09:10Z MEMBER

The reason for not using numeric only for max/min is that they should be well defined even for strings and dates -- unlike aggregations like mean, sum, variance (actually, in principle most should be able to work OK for dates but the numpy codes has some bugs we would need to work around).

.

The bytes handling in to_datetime is arguably a pandas bug. Alternatively we could decode character arrays from netcdf as unicode instead of bytes, but I'm not sure that's unambiguously the right thing to do. This is a place where the legacy Python 2 distinction of strings/unicode is a closer match for netcdf (and scientific file formats more generally) than the Python 3 behavior.

On Fri, Jul 3, 2015 at 4:40 PM, Will Holmgren notifications@github.com wrote:

Thanks for the tips. This may be Python 3 specific, but I needed to convert to convert to strings first

python times_strings = list(map(lambda x: x.decode('utf-8'), ds['Times'].values)) ds['Times'] = ('Time', pd.to_datetime(times_strings, format='%Y-%m-%d_%H:%M:%S'))

Is there a reason why you don't use numeric_only=True for the min and max functions? I was just recommending more consistency across the min/max/mean/std/etc functions. Might also be good to be explicit about that in the doc strings.

Reply to this email directly or view it on GitHub: https://github.com/xray/xray/issues/453#issuecomment-118437972

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  92762200
Powered by Datasette · Queries took 1.583ms · About: xarray-datasette