.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/load_2021_2022_test_data.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note You can download :ref:`below ` the full example code and run it online in `Codespaces `__ .. image:: https://github.com/codespaces/badge.svg :target: https://codespaces.new/spark-cleantech-l3/sda-copy?quickstart=1 --- .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_load_2021_2022_test_data.py: Load 2021-2022 test data. ========================= This example shows how to load the test data for the years 2021 and 2022 using the high-level :py:func:`sda.api.load.load_test` function. .. GENERATED FROM PYTHON SOURCE LINES 10-12 First, we import the required libraries. ----------------------------------------- .. GENERATED FROM PYTHON SOURCE LINES 12-16 .. code-block:: Python import pandas as pd from sda.api.load import load_test .. GENERATED FROM PYTHON SOURCE LINES 17-19 Then, we define the test names to be loaded. -------------------------------------------- .. GENERATED FROM PYTHON SOURCE LINES 19-34 .. code-block:: Python # Test names (the load_test function will automatically find the files) test_names = [ "21s16", # Sparkv3 - Pyrolyse quanti "21s17c", # section_reduite "21s37", # pyrolyse run bas débit - chromato "21s42", # pyrolyse run bas débit - chromato "22s01", # pyrolyse exploration pression "22s03", # temps formation jonction "22s05a", # pyrolyse reacteur V3C "22s05b", # pyrolyse reacteur V3D "22s11", # pyrolyse reacteur V3D "22s25", # pyrolyse reacteur V4A ] .. GENERATED FROM PYTHON SOURCE LINES 35-37 Now, we can load the data using the high-level `load_test()` function. ----------------------------------------------------------------------- .. GENERATED FROM PYTHON SOURCE LINES 37-51 .. code-block:: Python # Load all tests and combine into a single DataFrame all_dataframes = [] for test_name in test_names: df = load_test(test_name) all_dataframes.append(df) # Combine all DataFrames df = pd.concat(all_dataframes, ignore_index=True) # Output print(f"{len(df)} experimental points parsed") print(df) .. _sphx_glr_download_auto_examples_load_2021_2022_test_data.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: load_2021_2022_test_data.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: load_2021_2022_test_data.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: load_2021_2022_test_data.zip `