gsolve.GravityObservations.from_excel#
- classmethod GravityObservations.from_excel(excel_file, sheet_name=None, ignore_unknown_fields=False, parse_split_datetime=True, mapper=None, **kwargs)#
Create an object from an Excel file.
- Parameters:
- excel_filestr or PathLike
The path to the Excel file.
- sheet_namestr, int, or list-like, optional
The name or index of the worksheet to read. If None, then try to use the default sheet name(s) defined in the class.
- ignore_unknown_fieldsbool, default False
Only include known fields in the resulting object.
- parse_split_datetime: bool, default False
If True, parse discrete year, month, day columns into a single datetime column and drop the original columns. Expected columns are [year, month, day, hour, minute, second, microsecond, nanosecond], with at least year, month, and day being required.
- mapperdict-like or function, default None
Dict-like or function transformations to apply to column names before. Allows non-standard column/field names to be corrected prior to object creation. The simplest use case is to provide a dict of input_name, output_name pairs e.g.
{'lat': 'latitude', ...}- kwargs
Additional keyword arguments to be passed to
pandas.read_excel.
- Returns:
- GSolveTable
See also
pandas.read_excelFor available
kwargs.pandas.DataFrame.renameFor full details of
mapperargument.