88
99
1010class  Reader :
11-     """Reader Class""" 
11+     """Reader Class 
12+     """ 
1213
1314    def  read (
1415        filepath : os .PathLike ,
@@ -37,9 +38,12 @@ def read(
3738        Reading a file 
3839
3940        Args: 
40-             filepath : path of the file. 
41-             columns  : list of columns. 
42-             units    : dict for the units. 
41+ 
42+         filepath : path of the file. 
43+ 
44+         columns  : list of columns. 
45+ 
46+         units    : dict for the units. 
4347
4448        """ 
4549        if  pathlib .PurePosixPath (filepath ).suffix  ==  ".dat" :
@@ -55,13 +59,13 @@ def read(
5559
5660    def  drop_columns (data : pd .DataFrame , columns : list ):
5761        """ 
58-         drop  columns from the DataFrame 
62+         Drop  columns from the DataFrame 
5963
6064        Args: 
6165
62-              data  :  pandas dataFrame 
66+         data  :  pandas dataFrame 
6367
64-              columns: list of columns to be droped 
68+         columns: list of columns to be droped 
6569        """ 
6670        if  len (columns ) !=  0 :
6771            data  =  data .drop (columns = columns , axis = 1 )
@@ -70,10 +74,15 @@ def drop_columns(data: pd.DataFrame, columns: list):
7074    def  read_corr (data : pd .DataFrame , row : int , column : int ):
7175        """ 
7276        read a correlation matrix 
77+ 
7378        Args: 
74-             data  :  pandas dataFrame 
75-             row   :  number of row element 
76-             column   :  number of column element 
79+ 
80+         data  :  pandas dataFrame. 
81+ 
82+         row   :  number of row element. 
83+ 
84+         column   :  number of column element. 
85+ 
7786        """ 
7887        return  data .iloc [row , column ]
7988
@@ -82,7 +91,8 @@ def correlation(data: pd.DataFrame):
8291        provides correlation matrix for the DataFrame 
8392
8493        Args: 
85-             data  :  pandas dataFrame 
94+ 
95+         data  :  pandas dataFrame 
8696        """ 
8797        data  =  data .dropna (axis = 1 , how = "all" )
8898        m_corr  =  data .corr (method = "pearson" )
@@ -91,7 +101,9 @@ def correlation(data: pd.DataFrame):
91101    def  len (data : pd .DataFrame ):
92102        """ 
93103        number of rows in the dataframe 
104+ 
94105        Args: 
95-             data  :  pandas dataFrame 
106+ 
107+         data  :  pandas dataFrame 
96108        """ 
97109        return  len (data )
0 commit comments