Returns the dataset's file extension (i.e. .csv, .json, .xlsx, etc.) :return: the dataset's file extension (str)
(self)
| 40 | return (file_stats.st_size / (1024 ** 2)) |
| 41 | |
| 42 | def retrieve_extension(self): |
| 43 | ''' |
| 44 | Returns the dataset's file extension (i.e. .csv, .json, .xlsx, etc.) |
| 45 | |
| 46 | :return: the dataset's file extension (str) |
| 47 | ''' |
| 48 | ext_index = self.filepath.rindex('.') |
| 49 | return self.filepath[ext_index:] |
| 50 | |
| 51 | def data_generator(self): |
| 52 | ''' |