<jupyter_start><jupyter_text>This is a Jupyter Notebook that shows examples of all the functions in the maccorcyclingdata package.<jupyter_code>import maccorcyclingdata.testdata as testdata
import maccorcyclingdata.schedules as schedules
import maccorcyclingdata.validate as validate
import importlib
df = testdata.import_maccor_data('example_data/', 'testdata.csv')
df.head(5)
mult_df = testdata.import_multiple_csv_data('example_data/multiple_csv/')
mult_df.head(5)
cycles = testdata.get_num_cycles(mult_df)
print("The number of cycles in testdata.csv: " + str(cycles))
data = testdata.get_cycle_data(df, ['current_ma', 'voltage_v'], [1, 39], [11, 13])
data.head(5)
del_df = testdata.delete_cycle_steps(df, [1, 2])
del_df.head(5)
print(len(df))
print(len(del_df))
del_df_shifted = testdata.delete_cycle_steps(df, [1,2], True)
del_df_shifted.head(5)
print(len(del_df_shifted))
schedule_df = schedules.import_schedules('example_data/','schedule.csv')
schedule_df
validation_df = validate.validate_test_data(schedule_df, df, 108, 60, 5, 50, False, 3, 2)
validation_df
schedule_df_errors = schedules.import_schedules('example_data/','schedule_errors.csv')
schedule_df_errors
df_errors = testdata.import_maccor_data('example_data/', 'testdata_errors.csv')
df_errors
importlib.reload(validate)
validation_df = validate.validate_test_data(schedule_df_errors, df_errors, 108, 60, 5, 50, False, 3, 2)
validation_df<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11830201809324982, 'fraction_numerical': 0.025052192066805846, 'mean_word_length': 8.917241379310346, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '97738', 'license': 'MIT', 'n_tokens_mistral': 549, 'n_tokens_neox': 515, 'n_words': 100, 'path': 'example.ipynb', 'repo_name': 'shriyachallam/MaccorCyclingData', 'size': '1437'}