Allow deletion of certain datapoints from the datasets
This commit is contained in:
parent
116e65e0e1
commit
e6a4e2c81f
1 changed files with 9 additions and 1 deletions
|
|
@ -266,7 +266,9 @@ def process_neware_data(df, options={}):
|
||||||
'molecular_weight': None,
|
'molecular_weight': None,
|
||||||
'reverse_discharge': False,
|
'reverse_discharge': False,
|
||||||
'splice_cycles': None,
|
'splice_cycles': None,
|
||||||
'increment_cycles_from': None} # index
|
'increment_cycles_from': None,# index
|
||||||
|
'delete_datapoints': None, # list of indices
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
aux.update_options(options=options, required_options=required_options, default_options=default_options)
|
aux.update_options(options=options, required_options=required_options, default_options=default_options)
|
||||||
|
|
@ -282,9 +284,15 @@ def process_neware_data(df, options={}):
|
||||||
|
|
||||||
df = unit_conversion(df=df, options=options) # converts all units from the old units to the desired units
|
df = unit_conversion(df=df, options=options) # converts all units from the old units to the desired units
|
||||||
|
|
||||||
|
print(df.iloc[1:10])
|
||||||
|
|
||||||
if options['increment_cycles_from']:
|
if options['increment_cycles_from']:
|
||||||
df['cycle'].iloc[options['increment_cycles_from']:] += 1
|
df['cycle'].iloc[options['increment_cycles_from']:] += 1
|
||||||
|
|
||||||
|
if options['delete_datapoints']:
|
||||||
|
for datapoint in options['delete_datapoints']:
|
||||||
|
df.drop(index=datapoint, inplace=True)
|
||||||
|
|
||||||
if options['splice_cycles']:
|
if options['splice_cycles']:
|
||||||
df = splice_cycles(df=df, options=options)
|
df = splice_cycles(df=df, options=options)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue