Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Convert Series to DateTime

import pandas as pd

# Define Panda Series
times = pd.Series(["2021-01-25", "2021/01/08", "2021", "Jan 4th, 2022"])

# Print Series
print("Series: 
", times, "
")

# Convert Series to datetime
print("datetime: 
", pd.to_datetime(times))
Source by www.golinuxcloud.com #
 
PREVIOUS NEXT
Tagged: #Convert #Series #DateTime
ADD COMMENT
Topic
Name
8+7 =