mh_utils.csv_parser.utils
CSV utility functions.
New in version 0.2.0.
Functions:
|
Concatenate multiple JSON files together and return a list of |
|
Drop columns from the MassHunter CSV file. |
|
Reorder columns from the MassHunter CSV file. |
-
concatenate_json
(*files, outfile=None)[source] Concatenate multiple JSON files together and return a list of
Sample
objects in the concatenated json output.
-
drop_columns
(df, *, axis=1, inplace=True, **kwargs)[source] Drop columns from the MassHunter CSV file.
- Parameters
df (
DataFrame
) – Thepandas.DataFrame
to drop columns in.axis (
int
) – Which axis to drop columns on. Default1
.inplace (
bool
) – Whether to modify thepandas.DataFrame
in place. DefaultTrue
.kwargs – Additional keyword arguments passed to
pandas.DataFrame.drop()
.
- Return type
-
reorder_columns
(df)[source] Reorder columns from the MassHunter CSV file.
- Parameters
df (
DataFrame
) – Thepandas.DataFrame
to reorder columns in.- Return type