Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

hwo to separate datetime column into date and time pandas

import pandas as pd
df = pd.read_csv(file_path)

df['Dates'] = pd.to_datetime(df['date']).dt.date
df['Time'] = pd.to_datetime(df['date']).dt.time
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #hwo #separate #datetime #column #date #time #pandas
ADD COMMENT
Topic
Name
5+2 =