Import Columns from Excel as Dates Using Pandas


To import certain columns as dates from an Excel sheet using Pandas, simply use the "parse_dates" parameter to pass a list of columns that should be imported as dates.

 1|  import pandas as pd
 3|  df = pd.read_excel('Returns.xlsx', 
 4|  		sheet_name='Returns', 
 5|  		parse_dates=['order_date'])
Did you find this snippet useful?

Sign up for free to to add this to your code library