Skip to content
Discussion options

You must be logged in to vote

I'm importing my external dataset from a CSV file, and the timestamp field was being imported with dtype object. Upon @kabaros' suggestion, these two lines convert the timestamps in energy_context_df and energy_test_df to datetime64[ns] (energy_future_df doesn't need fixing because its timestamp is generated with dtype datetime64[ns]):

energy_context_df['timestamp'] = pd.to_datetime(energy_context_df['timestamp'])
energy_test_df['timestamp'] = pd.to_datetime(energy_test_df['timestamp'])

The figures then display correctly.

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@abdulfatir
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by oavaldezi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants