A library that transforms notion tables into pandas dataframes by connecting with Notion API
- pip install -r ./requirements.txt
- Create an integration here.
- Save your token from the previous page
- Save the id_table when you are in your table the address will look similar to this https://www.notion.so/d1234?v=5678. You need to save the string after the / and before the ?
- On the top left of your table visualization you have tre dots (...) click on that, after click on add connections and search for the integration you have create in point 2 and click confirm
- Use this library 😎
from NotionPandas import NotionPandas
import pandas as pd
npd = NotionPandas("token", "id_table")
npd.to_csv('test.csv')
df = npd.return_pandas()
df.head()