The class textFileReader defines some methods to read text files during the process data about the content of the file is logged into a dictionary, I named it metadata.
default_mode: Is the default way to read a file in python, it not requires additional libraries. The metadata structure generated by is metadata_dfmode:
{'function': <<Function_name>>, 'filename': <<file_name>>, 'length': len(<<data_readed>>)}
pandas_mode: Using pandas to load the information of the file into pandas Dataframe, it requires the libraries:
- pandas The metadata structure generated by is metadata_pdmode:
{ 'function': 'pandas_mode', 'file_name': filename, 'length': filedata.shape, 'columns': filedata.columns, 'null_cols': nullcols.to_dict(), 'file_size': self.__get_file_size__(self.path + filename) }