ForecastGRRateGrid.strip#
- ForecastGRRateGrid.strip(inplace: bool = False) GRRateGrid | None#
Remove all columns except the required ones for a GRRateGrid.
- Parameters:
inplace – Whether to perform the operation in place on the data.
- Returns:
rategrid – GRRateGrid with the stripped columns.
Examples
Create a GRRateGrid with additional columns and then strip it to only keep the required columns.
>>> from seismostats import GRRateGrid >>> rategrid = GRRateGrid( >>> columns=['longitude_min', 'longitude_max', >>> 'latitude_min', 'latitude_max', >>> 'depth_min', 'depth_max', 'a', >>> 'b', 'mc', 'col1', 'col2']) >>> rategrid = rategrid.strip() >>> rategrid.columns Index(['longitude_min', 'longitude_max', 'latitude_min', 'latitude_max', 'depth_min', 'depth_max', 'a', 'b', 'mc'], dtype='object')