Skip to content
/ mllab Public

Laboratory to play with python and Machine Leaning

Notifications You must be signed in to change notification settings

avelezd/mllab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Reading and parsing textfiles

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) }

About

Laboratory to play with python and Machine Leaning

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages