Delete unnecessary columns

    0

    0

    Wyx Smrf

    Preprocessing

    Deletes unnecessary columns

    Library: Pandas

    Filename pattern: .ipynb, .py

    import pandas as pd
    
    def delete_columns(dataframe, cols_list):
        new_dataframe = dataframe.drop(columns = cols_list, axis=1)
        return new_dataframe
    
    df = delete_columns(df, ['Dividends', 'Stock Splits'])
    df.head()
    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.