Replace NA values in a Pandas column



    Javier Pacheco

    This line fills in missing values in Column with the value of replace.

    import pandas as pd
    df['Column'] = df['Column'].fillna('replace')
    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.