def setDataFrameFromFile(self, filepath, **kwargs):
"""
Sets the model's dataFrame by reading a file.
Accepted file formats:
- .xlsx (sheet1 is read unless specified in kwargs)
- .csv (comma separated unless specified in kwargs)
- .txt (any separator)
:param filepath: (str)
The path to the file to be read.
:param kwargs:
pandas.read_csv(**kwargs) or pandas.read_excel(**kwargs)
:return: None
"""
df = superReadFile(filepath, **kwargs)
self.setDataFrame(df, filePath=filepath)
评论列表
文章目录