pydata / xarray

N-D labeled arrays and datasets in Python
https://xarray.dev
Apache License 2.0
3.49k stars 1.04k forks source link

use a `composite` strategy to generate the dataframe with a tz-aware datetime column #9174

Closed keewis closed 1 day ago

keewis commented 1 week ago

This tries to use a composite strategy to generate a dataframe with a single timezone-aware datetime column. This works, but it feels somewhat weird to have to jump through hoops just get a standard timezone-aware datetime column.

@Zac-HD, do you have any advice here (as usual, time permitting)? Am I missing anything, or is this something that currently is not supported by hypothesis.extra.pandas? For context, what we have right now on main returns object dtypes, not the timezone-aware extension dtypes.

Zac-HD commented 1 week ago

Am I missing anything, or is this something that currently is not supported by hypothesis.extra.pandas? For context, what we have right now on main returns object dtypes, not the timezone-aware extension dtypes.

I think our Pandas extra just hasn't been updated to support this yet; mind opening an issue for us?

keewis commented 1 day ago

@dcherian, should we merge this? I can't find a way avoid the composite strategy, so this might be the best we can do right now.