dataset general information

    0

    0

    def general_info(df): shape: () data type column sum list_dtype = [] for i in list(df.columns): list_dtype.append(str(df[i].dtype)) sum_dtype = {i: list_dtype.count(i) for i in list_dtype} print('dtype: ', sum_dtype)

    null Values

    print('nullValues: ',df.isnull().values.any())

    columns with one value

    one_val = [] for i in df.columns: if len(df[i].unique()) == 1: one_val.

    ### general information ### def general_info(df):
    
    def general_info(df):
      # shape
      print('shape: ',df.shape)
    
      # data type column sum
      list_dtype = []
      for i in list(df.columns):
        list_dtype.append(str(df[i].dtype))
    
      sum_dtype = {i: list_dtype.count(i) for i in list_dtype}
      print('dtype: ', sum_dtype)
      # null Values
      print('nullValues: ',df.isnull().values.any())
    
      # columns with one value
      one_val = []
      for i in df.columns:
        if len(df[i].unique()) == 1:
          one_val.append(i)
      if len(one_val) != 0:
        print('Columns with not variance: ', one_val)
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Explore
    • Cookbooks
    • Playground
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.