to_dataframe
dtypes argument could allow functions that take pandas.Series
-like object and return new series
#807
Labels
api: bigquery
Issues related to the googleapis/python-bigquery API.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
Is your feature request related to a problem? Please describe.
Some timestamp-related methods don't quite work with the current string/dtype object logic. For example, I'm having a hard time getting
TIME
data types to parse as thetimedelta64[ns]
dtype.I also think this feature would be useful for extension dtypes like Fletcher (https://github.com/xhochy/fletcher) and GeoPandas (https://geopandas.org/)
Describe the solution you'd like
Look at the
dtypes
dictionary. If any value is a function / callable, save them for later. Create the initial dataframe using the other dtypes, then follow-up and call the desired transformation functions.Describe alternatives you've considered
Keep
dtypes
a simple pass-through to pandas and either:Additional context
Possibly useful when setting up default dtypes #786 #793
The text was updated successfully, but these errors were encountered: