Delete a column from a Pandas Dataframe



    Javier Pacheco

    The del command deletes a row or a column of a table.

    import pandas as pd
    del df[column]
    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.