Skip to content

Load a file from your Data Store into a notebook

Draft: not yet validated

The code on this page was run inside MESA JupyterLab on 2026-11-13 and produced the output shown. The steps were followed there once on 2026-11-16 by the AI assistant that drafted the page. No person has yet followed them, so a screen may differ. Tell us what you find.

You will: have both practice files loaded as tables in a notebook, with a row count you have checked.

Time: 5 minutes. You need: MESA JupyterLab running, and the practice data in a mesa-practice folder in your Data Store.

Steps

  1. In JupyterLab's file browser, open your mesa-practice folder.

    You should see: gauges.csv and readings.csv.

  2. Choose File → New → Notebook. In the Select Kernel box, change the choice to Python 3 (ipykernel) (it starts on another language) and click Select. Then choose File → Rename Notebook…. In the Rename File box the part of the name before .ipynb is already selected: type practice over it and click Rename.

    You should see: practice.ipynb in the file browser, beside the two CSV files.

  3. Type this into the first cell and press Shift+Enter:

    import pandas as pd
    
    readings = pd.read_csv("readings.csv")
    gauges = pd.read_csv("gauges.csv")
    

    You should see: no output and no error. A file name with no folder in front of it means "in the same folder as this notebook".

  4. In the next cell, run:

    readings.shape
    

    You should see: the number of rows, then the number of columns.

    (152, 4)
    
  5. Run:

    readings.head()
    

    You should see: the first five rows. NaN in flag is how pandas shows a blank.

      gauge_id        date  value flag
    0      G01  2026-07-01    0.0  NaN
    1      G01  2026-07-02    0.0  NaN
    2      G01  2026-07-03   24.9  NaN
    3      G01  2026-07-04    0.0  NaN
    4      G01  2026-07-05   17.6  NaN
    
  6. Choose File → Save Notebook.

    You should see: the dot on the notebook's tab disappear.

Check it worked

readings.shape is (152, 4) and gauges.shape is (5, 4), the sizes the practice data page gives. A different count means you loaded a different file, or only part of this one.

If it didn't

The notebook is named practice.ipynb.ipynb. You typed the ending as well as the name. Choose File → Rename Notebook… again and remove one .ipynb.

FileNotFoundError: [Errno 2] No such file or directory: 'readings.csv'. The notebook is not in the same folder as the files. In the file browser, drag practice.ipynb into mesa-practice, then choose Kernel → Restart Kernel… and run the first cell again.

Next

Not yet validated by a person in MESA JupyterLab. Drafted with AI assistance on 2026-11-12; the code was run there on 2026-11-13 and the steps followed once on 2026-11-16 (pandas 3.1.1, DuckDB 2.0.0).

Machine-readable versions of this page: Markdown twin · raw source on GitHub · llms.txt · llms-full.txt (whole site). See For AI agents.