question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't convert object type column to datetime64 with to_datetime

See original GitHub issue

In my data frame, I have a column of object type that I want to convert to datetime. In pandas, I call pd.to_datetime(data["Received DtTm"]) on a pandas data frame, which returns the column in datetime64 format. After I execute ks.to_datetime(data["Received DtTm"])` on a Koalas data frame and call head on the column, I run into an error. Screen Shot 2019-05-21 at 2 30 02 PM

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Philippe-Neveuxcommented, Sep 10, 2020

Same here. I have got a similar error when I’m trying to change an object column into datetime64[ns] column. Anyone has an idea ?

image

0reactions
rguillomecommented, Dec 11, 2020

@HyukjinKwon 👎 Arrow legacy IPC format is not supported in PySpark, please unset ARROW_PRE_0_15_IPC_FORMAT

Read more comments on GitHub >

github_iconTop Results From Across the Web

Converting pandas columns to datetime64 including missing ...
convert_objects won't forcibly convert a column to datetime unless it has a least 1 non-nan thing that is a date (that why your...
Read more >
Pandas Convert Column To DateTime - Spark by {Examples}
Use astype() function to convert the string column to datetime data type in pandas DataFrame. The data type of the DateTime isdatetime64[ns] ;...
Read more >
date conversion on dataframe is ignored on assignment if it is ...
any column which is of type datetime64 can not be converted to a new type. df.date = df.date.astype(datetime.date) df.date = df.date.astype('O')
Read more >
Time series / date functionality — pandas 1.5.2 documentation
["1/1/2018", np.datetime64("2018-01-01"), datetime.datetime(2018, 1, 1)] . ... You can also pass a DataFrame of integer or string columns to assemble into a ...
Read more >
pandas change all column type to string
To convert the column type from object or string to datetime in Pandas DataFrame, ... 21 hours ago · Background - float type...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found