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/2666#issuecomment-569820784,https://api.github.com/repos/pydata/xarray/issues/2666,569820784,MDEyOklzc3VlQ29tbWVudDU2OTgyMDc4NA==,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}",,398107776
https://github.com/pydata/xarray/issues/2666#issuecomment-569819509,https://api.github.com/repos/pydata/xarray/issues/2666,569819509,MDEyOklzc3VlQ29tbWVudDU2OTgxOTUwOQ==,1217238,2019-12-30T22:51:36Z,2019-12-30T22:51:55Z,MEMBER,"> Just FYI, we're potentially enforcing this deprecation in [pandas-dev/pandas#30563](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?
I don't think so. Xarray users have been seeing this warning for a while, so they should expect something will change.
Also, I don't think there are that many users using DatetimeTZ in xarray.
> 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__`
I think this is basically the same change. Is there a full example of the behavior that you are worried about?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,398107776
https://github.com/pydata/xarray/issues/2666#issuecomment-569810375,https://api.github.com/repos/pydata/xarray/issues/2666,569810375,MDEyOklzc3VlQ29tbWVudDU2OTgxMDM3NQ==,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}",,398107776
https://github.com/pydata/xarray/issues/2666#issuecomment-569805431,https://api.github.com/repos/pydata/xarray/issues/2666,569805431,MDEyOklzc3VlQ29tbWVudDU2OTgwNTQzMQ==,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}",,398107776
https://github.com/pydata/xarray/issues/2666#issuecomment-458925514,https://api.github.com/repos/pydata/xarray/issues/2666,458925514,MDEyOklzc3VlQ29tbWVudDQ1ODkyNTUxNA==,6623132,2019-01-30T12:25:15Z,2019-01-30T12:25:15Z,NONE,"The current implementation caused some issues, since files from different sources suddenly can't import and sort together like they used to. I'm fine with a dtypes argument, but where will you pass it? This is arising in .sort_index() for me.","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,398107776
https://github.com/pydata/xarray/issues/2666#issuecomment-453356449,https://api.github.com/repos/pydata/xarray/issues/2666,453356449,MDEyOklzc3VlQ29tbWVudDQ1MzM1NjQ0OQ==,1217238,2019-01-11T02:54:32Z,2019-01-11T02:54:32Z,MEMBER,"I'm open to suggestions here, especially from users who use DatetimeTZ data in pandas.
As noted in https://github.com/pandas-dev/pandas/issues/24716, I think the cleanest solution is probably to add a `dtypes` argument to `from_dataframe`, to allow users to specify their own desired dtypes for pandas -> numpy coercion.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,398107776