Back to Llama Index

**Google Sheets Reader**

docs/examples/data_connectors/GoogleSheetsDemo.ipynb

0.14.21662 B
Original Source

Google Sheets Reader

Demonstrates Google Sheets Reader in LlamaIndex

  • Make Sure you have token.json or credentials.json file in the Environment, More on that here
python
from llama_index.readers.google import GoogleSheetsReader

Load Sheets as a List of Pandas Dataframe

python
list_of_sheets = ["1ZF5iIeLLqROHbHsb1vOeRaLWKIgLU7rDDTSOZaqjpk0"]
sheets = GoogleSheetsReader()
dataframes = sheets.load_data_in_pandas(list_of_sheets)
python
dataframes[0]

Or Load Sheets as a List of Document Objects

python
documents = sheets.load_data(list_of_sheets)