OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Failed to convert the pandas datetime object to another format

  • Thread starter Thread starter Bogaso
  • Start date Start date
B

Bogaso

Guest
I tried to convert a python datetime object to another format as below

Code:
import pandas as pd
pd.to_datetime(['1/1/1900']).dt.strftime('%Y-%m')

However above code generates error.

Could you please tell me what would be the right approach
<p>I tried to convert a <code>python</code> datetime object to another format as below</p>
<pre><code>import pandas as pd
pd.to_datetime(['1/1/1900']).dt.strftime('%Y-%m')
</code></pre>
<p>However above code generates error.</p>
<p>Could you please tell me what would be the right approach</p>
 

Latest posts

I
Replies
0
Views
1
impact christian
I
Top