Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to change datetime format to mmyy in dataframe

df['sale_date'] = pd.to_datetime(df['sale_date'], format='%d/%m/%y %H:%M:%S').dt.strftime('%Y-%m-%d %H:%M:%S')
Comment

how to change datetime format to mmyy in dataframe

df['sale_date'] = pd.to_datetime(df['sale_date'], format='%d/%m/%y %H:%M:%S').dt.strftime('%Y-%m-%d %H:%M:%S')
Comment

how to change datetime format to mmyy in dataframe

df['sale_date'] = pd.to_datetime(df['sale_date'], format='%d/%m/%y %H:%M:%S').dt.strftime('%Y-%m-%d %H:%M:%S')
Comment

PREVIOUS NEXT
Code Example
Python :: get mode using python 
Python :: check audio playing on windows python 
Python :: python pickle module 
Python :: convert dictionary keys to list python 
Python :: remove whitespace from data frame 
Python :: numpy evenly spaced numbers 
Python :: seaborn modificar o tamanho dos graficos 
Python :: py function 
Python :: get particular columns from dataframe 
Python :: Concat Sort codechef solution 
Python :: tkinter canas can you use other fonts 
Python :: from pandas to dictionary 
Python :: enumerate in django templte 
Python :: tic-tac toe in pygame 
Python :: python list as queue 
Python :: sorting decimal numbers in python 
Python :: python printing hello world 
Python :: len of iterator python 
Python :: List Comprehension generate a list 
Python :: standard deviation in python numpy 
Python :: newline in python gives an extra one 
Python :: add a column with initial value to an existing dataframe 
Python :: create bootable usb apple 
Python :: pygame keys keep pressing 
Python :: request post python 
Python :: python with 
Python :: python3 tuple 
Python :: abs in python 3 
Python :: python typing list of possible values 
Python :: http python lib 
ADD CONTENT
Topic
Content
Source link
Name
3+3 =