-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add column_dtypes to forcibly convert the type #594
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @grieve54706. I have one question for this.
'orderdate': 'object', | ||
'order_cust_key': 'object', | ||
'timestamp': 'object', | ||
'timestamptz': 'object' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curiously, why are those object after setting the specific column type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because we format the datetime to string. String in the dtype is objcet. The data type is mapping the data value. If we want to keep the type is datetime, we should not format the value. But we need the value format.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. Thanks. It's good for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
We will convert types in the data frame by input dtypes.
We also format datetime to a formatted string.
HTTP example
Response difference
Additional information
Pandas dtypes https://pandas.pydata.org/docs/user_guide/basics.html#dtypes