home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

3 rows where issue = 398107776 and user = 1312546 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date), updated_at (date)

user 1

  • TomAugspurger · 3 ✖

issue 1

  • Dataset.from_dataframe will produce a FutureWarning for DatetimeTZ data · 3 ✖

author_association 1

  • MEMBER 3
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
569820784 https://github.com/pydata/xarray/issues/2666#issuecomment-569820784 https://api.github.com/repos/pydata/xarray/issues/2666 MDEyOklzc3VlQ29tbWVudDU2OTgyMDc4NA== TomAugspurger 1312546 2019-12-30T22:58:23Z 2019-12-30T22:58:23Z MEMBER

I think this is basically the same change.

Ah, I was mistaken. I was thinking we needed to plump a dtype argument all the way through there, but I don't think that's necessary. I may be able to submit a PR with a dtypes argument for from_dataframe tomorrow.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Dataset.from_dataframe will produce a FutureWarning for DatetimeTZ data 398107776
569810375 https://github.com/pydata/xarray/issues/2666#issuecomment-569810375 https://api.github.com/repos/pydata/xarray/issues/2666 MDEyOklzc3VlQ29tbWVudDU2OTgxMDM3NQ== TomAugspurger 1312546 2019-12-30T22:07:30Z 2019-12-30T22:07:30Z MEMBER

And there are a couple places that need updating, even with a dtypes argument to let the user specify things. We also hit this via Dataset.__setitem__

```pytb ~/sandbox/xarray/xarray/core/dataset.py in setitem(self, key, value) 1268 ) 1269 -> 1270 self.update({key: value}) 1271 1272 def delitem(self, key: Hashable) -> None:

~/sandbox/xarray/xarray/core/dataset.py in update(self, other, inplace) 3521 """ 3522 _check_inplace(inplace) -> 3523 merge_result = dataset_update_method(self, other) 3524 return self._replace(inplace=True, **merge_result._asdict()) 3525

~/sandbox/xarray/xarray/core/merge.py in dataset_update_method(dataset, other) 862 other[key] = value.drop_vars(coord_names) 863 --> 864 return merge_core([dataset, other], priority_arg=1, indexes=dataset.indexes)

~/sandbox/xarray/xarray/core/merge.py in merge_core(objects, compat, join, priority_arg, explicit_coords, indexes, fill_value) 550 coerced, join=join, copy=False, indexes=indexes, fill_value=fill_value 551 ) --> 552 collected = collect_variables_and_indexes(aligned) 553 554 prioritized = _get_priority_vars_and_indexes(aligned, priority_arg, compat=compat)

~/sandbox/xarray/xarray/core/merge.py in collect_variables_and_indexes(list_of_mappings) 275 append_all(coords, indexes) 276 --> 277 variable = as_variable(variable, name=name) 278 if variable.dims == (name,): 279 variable = variable.to_index_variable()

~/sandbox/xarray/xarray/core/variable.py in as_variable(obj, name) 105 elif isinstance(obj, tuple): 106 try: --> 107 obj = Variable(*obj) 108 except (TypeError, ValueError) as error: 109 # use .format() instead of % because it handles tuples consistently

~/sandbox/xarray/xarray/core/variable.py in init(self, dims, data, attrs, encoding, fastpath) 306 unrecognized encoding items. 307 """ --> 308 self._data = as_compatible_data(data, fastpath=fastpath) 309 self._dims = self._parse_dimensions(dims) 310 self._attrs = None

~/sandbox/xarray/xarray/core/variable.py in as_compatible_data(data, fastpath) 229 if isinstance(data, np.ndarray): 230 if data.dtype.kind == "O": --> 231 data = _possibly_convert_objects(data) 232 elif data.dtype.kind == "M": 233 data = np.asarray(data, "datetime64[ns]")

~/sandbox/xarray/xarray/core/variable.py in _possibly_convert_objects(values) 165 datetime64 and timedelta64, according to the pandas convention. 166 """ --> 167 return np.asarray(pd.Series(values.ravel())).reshape(values.shape) 168 169

~/sandbox/numpy/numpy/core/_asarray.py in asarray(a, dtype, order) 83 84 """ ---> 85 return array(a, dtype, copy=False, order=order) 86 87

~/sandbox/pandas/pandas/core/series.py in array(self, dtype) 730 "To keep the old behavior, pass 'dtype=\"datetime64[ns]\"'." 731 ) --> 732 warnings.warn(msg, FutureWarning, stacklevel=3) 733 dtype = "M8[ns]" 734 return np.asarray(self.array, dtype) ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Dataset.from_dataframe will produce a FutureWarning for DatetimeTZ data 398107776
569805431 https://github.com/pydata/xarray/issues/2666#issuecomment-569805431 https://api.github.com/repos/pydata/xarray/issues/2666 MDEyOklzc3VlQ29tbWVudDU2OTgwNTQzMQ== TomAugspurger 1312546 2019-12-30T21:45:41Z 2019-12-30T21:48:39Z MEMBER

Just FYI, we're potentially enforcing this deprecation in https://github.com/pandas-dev/pandas/pull/30563 (which would be included in a pandas release in a week or two). Is that likely to cause problems for xarray users?

It's not clear to me what the desired behavior is (https://github.com/pydata/xarray/issues/3291 seems to want to preserve the tz, though it isn't clear they are willing to be forced into an object dtype array for it).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Dataset.from_dataframe will produce a FutureWarning for DatetimeTZ data 398107776

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
);
CREATE INDEX [idx_issue_comments_issue]
    ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
    ON [issue_comments] ([user]);
Powered by Datasette · Queries took 12.643ms · About: xarray-datasette