Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to remove quasi constant column in pandas dataframe

def drop_constant_column(dataframe):
    """
    Drops constant value columns of pandas dataframe.
    """
    return dataframe.loc[:, (dataframe != dataframe.iloc[0]).any()]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #remove #quasi #constant #column #pandas #dataframe
ADD COMMENT
Topic
Name
1+2 =