def get_data(self): if self.file_stream is not None: sheets = load_data(self.file_stream, file_type=self.file_type, **self.keywords) else: sheets = load_data(self.file_content, file_type=self.file_type, **self.keywords) return one_sheet_tuple(sheets.items())
def get_data(self): if self.file_stream is not None: sheets = load_data(self.file_stream, file_type=self.file_type, **self.keywords) else: sheets = load_data(self.file_content, file_type=self.file_type, **self.keywords) return sheets, KEYWORD_MEMORY, None
def get_data(self): f = request.urlopen(self.url) info = f.info() if PY2: mime_type = info.type else: mime_type = info.get_content_type() file_type = FILE_TYPE_MIME_TABLE.get(mime_type, None) if file_type is None: file_type = get_file_type_from_url(self.url) content = f.read() sheets = load_data(content, file_type=file_type, **self.keywords) return sheets, KEYWORD_URL, None
def get_sql_book(self): return load_data(DB_DJANGO, models=[self.model])
def get_data(self): sheets = load_data(DB_SQL, session=self.session, tables=self.tables) return sheets, DB_SQL, None
def get_data(self): sheets = load_data(DB_DJANGO, models=self.models) return sheets, DB_DJANGO, None
def get_sql_book(self): return load_data(DB_SQL, session=self.session, tables=[self.table])
def test_load_ods_data(): load_data("test.ods")
def get_data(self): """ Return a dictionary with only one key and one value """ sheets = load_data(self.file_name, **self.keywords) return one_sheet_tuple(sheets.items())
def get_data(self): sheets = load_data(self.file_name, **self.keywords) path, filename_alone = os.path.split(self.file_name) return sheets, filename_alone, path
def test_load_csvz_data_from_memory(): if not PY2: io = StringIO() load_data(io, file_type="csvz") else: raise IOError("pass it")
def test_load_unknown_data_from_memory(): io = BytesIO() load_data(io, file_type="unknown")
def test_load_unknown_data(): load_data("test.unknown")
def test_load_ods_data_from_memory(): io = BytesIO() load_data(io, file_type="ods")
def test_none_type_load_data(): load_data(None)
def test_wrong_parameter_to_load_data(): load_data(1)