### Install gspread-dataframe via pip Source: https://github.com/robin900/gspread-dataframe/blob/master/README.rst Provides the command-line instruction to install the `gspread-dataframe` package using pip, the Python package installer. This is the recommended method for most users. ```sh pip install gspread-dataframe ``` -------------------------------- ### Install gspread-dataframe from GitHub Source Source: https://github.com/robin900/gspread-dataframe/blob/master/README.rst Provides command-line instructions to clone the `gspread-dataframe` repository from GitHub and install it directly from the source. This method is useful for developers or those who need the latest unreleased version. ```sh git clone https://github.com/robin900/gspread-dataframe.git cd gspread-dataframe python setup.py install ``` -------------------------------- ### Format Google Sheet from DataFrame using gspread-formatting Source: https://github.com/robin900/gspread-dataframe/blob/master/README.rst Shows how to use the `format_with_dataframe` function from the `gspread-formatting` package to apply formatting to a Google Sheet based on the DataFrame's structure after writing data. This functionality requires the `gspread-formatting` package to be installed separately. ```python import pandas as pd from gspread_dataframe import get_as_dataframe, set_with_dataframe from gspread_formatting.dataframe import format_with_dataframe worksheet = some_worksheet_obtained_from_gspread_client df = pd.DataFrame.from_records([{'a': i, 'b': i * 2} for i in range(100)]) set_with_dataframe(worksheet, df) format_with_dataframe(worksheet, df, include_column_header=True) ``` -------------------------------- ### Read Google Sheet to DataFrame with Pandas Options Source: https://github.com/robin900/gspread-dataframe/blob/master/README.rst Illustrates how to use `get_as_dataframe` with various Pandas text parsing options, similar to `pandas.read_csv`. This example shows parameters like `parse_dates`, `usecols`, `skiprows`, and `header` to control data parsing during retrieval. Note that only options supported by Pandas' 'python' engine are acceptable. ```python import pandas as pd from gspread_dataframe import get_as_dataframe worksheet = some_worksheet_obtained_from_gspread_client df = get_as_dataframe(worksheet, parse_dates=True, usecols=[0,2], skiprows=1, header=None) ``` -------------------------------- ### Transfer Data Between Google Sheets and Pandas DataFrame Source: https://github.com/robin900/gspread-dataframe/blob/master/README.rst Demonstrates the basic usage of `get_as_dataframe` and `set_with_dataframe` to read from and write to a Google Sheet using a Pandas DataFrame. It shows how to create a sample DataFrame, transfer it to a worksheet, and subsequently read it back. This requires an authenticated `gspread` worksheet object. ```python import pandas as pd from gspread_dataframe import get_as_dataframe, set_with_dataframe worksheet = some_worksheet_obtained_from_gspread_client df = pd.DataFrame.from_records([{'a': i, 'b': i * 2} for i in range(100)]) set_with_dataframe(worksheet, df) df2 = get_as_dataframe(worksheet) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.