[Python] Fill Missing Values in a datetime64[ns] col - pandas

Discussão em 'Python' iniciado por Stack, Dezembro 18, 2024.

  1. Stack

    Stack Membro Participativo

    If I have a df like this one:

    df = pd.DataFrame(
    {
    'A': range(6),
    'D': pd.date_range('20240101', periods = 6, freq = 'D')
    }
    )

    df['D'].astype('datetime64[ns]')
    df.loc[2 , 'D'] = pd.NaT


    How to fill the missing value in the column 'D' using: .interpolate(method = 'time') please?

    Continue reading...

Compartilhe esta Página