Browse Source

simplified concatenating mulitple dataframes into one

xmlparsing
Holger Frey 3 years ago
parent
commit
6804ae5cdd
  1. 4
      sensospot_data/parser.py

4
sensospot_data/parser.py

@ -107,9 +107,7 @@ def parse_multiple_files(file_list): @@ -107,9 +107,7 @@ def parse_multiple_files(file_list):
raise ValueError("Empty file list provided")
collection = (_silenced_parse_file(path) for path in file_list)
filtered = (frame for frame in collection if frame is not None)
data_frame = next(filtered)
for next_frame in filtered:
data_frame = data_frame.append(next_frame, ignore_index=True)
data_frame = pandas.concat(filtered, ignore_index=True).reset_index()
data_frame[META_DATA_WELL_ROW] = data_frame[META_DATA_WELL_ROW].astype(
"category"
)

Loading…
Cancel
Save