string format datetime pandas dataframe code example
Example 1: apply format to pandas datetime column
formatted_df = df["Date"].dt.strftime("%m/%d/%y")
Example 2: date parser python pandas
mydateparser = lambda x: pd.datetime.strptime(x, "%Y %m %d %H:%M:%S")
df = pd.read_csv("file.csv", sep='\t', names=['date_column', 'other_column'], parse_dates=['date_column'], date_parser=mydateparser)