Title: Can't upload data with "2019-07-08 08:00:00" datetime format to Google Bigquery with pandas · Issue #56 · googleapis/python-bigquery · GitHub
Open Graph Title: Can't upload data with "2019-07-08 08:00:00" datetime format to Google Bigquery with pandas · Issue #56 · googleapis/python-bigquery
X Title: Can't upload data with "2019-07-08 08:00:00" datetime format to Google Bigquery with pandas · Issue #56 · googleapis/python-bigquery
Description: Environment details I'm using pandas with google-cloud-python Steps to reproduce I have a dataframe has datetime format, ex: "2019-07-08 08:00:00" and my schema has created column with DATETIME type. I tried covert it to use pq.to_dateti...
Open Graph Description: Environment details I'm using pandas with google-cloud-python Steps to reproduce I have a dataframe has datetime format, ex: "2019-07-08 08:00:00" and my schema has created column with DATETIME typ...
X Description: Environment details I'm using pandas with google-cloud-python Steps to reproduce I have a dataframe has datetime format, ex: "2019-07-08 08:00:00" and my schema has created column wit...
Opengraph URL: https://github.com/googleapis/python-bigquery/issues/56
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Can't upload data with \"2019-07-08 08:00:00\" datetime format to Google Bigquery with pandas","articleBody":"#### Environment details\r\n\r\nI'm using pandas with google-cloud-python\r\n\r\n#### Steps to reproduce\r\n\r\n 1. I have a dataframe has datetime format, ex: \"2019-07-08 08:00:00\" and my schema has created column with DATETIME type.\r\n2. I tried covert it to use pq.to_datetime() \r\n3. Then I used load_table_from_dataframe() to insert data.\r\n\r\n#### Code example\r\n\r\n```py\r\nmy_df = get_sessions() # this return a dataframe has a column name is created which is datetime[ns] type ex :\"2020-01-08 08:00:00\"\r\nmy_df['created'] = pd.to_datetime(my_df['created'], format='%Y-%m-%d %H:%M:%S').astype('datetime64[ns]')\r\nres = bigquery_client.client.load_table_from_dataframe(my_df, table_id)\r\nres.result()\r\n\r\n# exp: my value \"2020-01-08 08:00:00\" is being changed as INVALID or this value \"0013-03-01T03:05:00\" or other wrong value @plamut please help\r\n```\r\nI just updated my problem . Here\r\nThanks!\r\n","author":{"url":"https://github.com/namnguyenbk","@type":"Person","name":"namnguyenbk"},"datePublished":"2020-03-09T16:20:49.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":36},"url":"https://github.com/56/python-bigquery/issues/56"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:9831b9bb-72b9-e8b8-0b53-f6cb2f1c2490 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BFB4:15D40:4107DB:5E387F:6A4E0611 |
| html-safe-nonce | c08e96fe18464759a679dff190bd90d77bd7fb4da9516602a99fb0dd65e51fcb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRkI0OjE1RDQwOjQxMDdEQjo1RTM4N0Y6NkE0RTA2MTEiLCJ2aXNpdG9yX2lkIjoiNTM3MjM1NzA2MDg0NjI5MDQ0OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 5d2e24409808478a7c0d835401add5cef3b33924157fd8081f2414245e0db649 |
| hovercard-subject-tag | issue:578236105 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/python-bigquery/56/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ad4213569ab9840c935193ee272f5657865a19b00ca3077724fb2aff163e7768/googleapis/python-bigquery/issues/56 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ad4213569ab9840c935193ee272f5657865a19b00ca3077724fb2aff163e7768/googleapis/python-bigquery/issues/56 |
| og:image:alt | Environment details I'm using pandas with google-cloud-python Steps to reproduce I have a dataframe has datetime format, ex: "2019-07-08 08:00:00" and my schema has created column with DATETIME typ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | namnguyenbk |
| hostname | github.com |
| expected-hostname | github.com |
| None | df0492960db29b4938cb72070351d6b1d0c6c0767b27ceb8394bbf4fcc0223c6 |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/python-bigquery git https://github.com/googleapis/python-bigquery.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 226992475 |
| octolytics-dimension-repository_nwo | googleapis/python-bigquery |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 226992475 |
| octolytics-dimension-repository_network_root_nwo | googleapis/python-bigquery |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 52bde38e24398476f8eb1e0760c81346c6a00812 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width