janitor.convert_unix_date(df: pandas.core.frame.DataFrame, column_name: Hashable) → pandas.core.frame.DataFrame[source]

Convert unix epoch time into Python datetime format.

Note that this ignores local tz and convert all timestamps to naive datetime based on UTC!

This method mutates the original DataFrame.

Functional usage syntax:

df = convert_unix_date(df, column_name='date')

Method chaining syntax:

import pandas as pd
import janitor
df = pd.DataFrame(...).convert_unix_date('date')
  • df – A pandas DataFrame.

  • column_name – A column name.


A pandas DataFrame with corrected dates.