MCPcopy Create free account
hub / github.com/Palashio/libra / retrieve_extension

Method retrieve_extension

libra/preprocessing/data_reader.py:42–49  ·  view source on GitHub ↗

Returns the dataset's file extension (i.e. .csv, .json, .xlsx, etc.) :return: the dataset's file extension (str)

(self)

Source from the content-addressed store, hash-verified

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 '''

Callers 1

data_generatorMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected