Convert into datetime data type

    0

    0

    Wyx Smrf

    Query

    The code assigns the value of the Date column to the Date_col column in the dataframe.

    df['Date_col'] = pd.to_datetime(df['Date_col'])
    
    df[(df['Date'].dt.year >= 2019)].copy()
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.