<commit_before>gspread-dataframe
-----------------

.. image:: https://badge.fury.io/py/gspread-dataframe.svg
    :target: https://badge.fury.io/py/gspread-dataframe

.. image:: https://travis-ci.org/robin900/gspread-dataframe.svg?branch=master
    :target: https://travis-ci.org/robin900/gspread-dataframe

.. image:: https://img.shields.io/pypi/dm/gspread-dataframe.svg
    :target: https://pypi.org/project/gspread-dataframe

This package allows easy data flow between a worksheet in a Google spreadsheet
and a Pandas DataFrame. Any worksheet you can obtain using the ``gspread`` package
can be retrieved as a DataFrame with ``get_as_dataframe``; DataFrame objects can
be written to a worksheet using ``set_with_dataframe``:

.. code:: 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)

The ``get_as_dataframe`` function supports the keyword arguments
that are supported by your Pandas version's text parsing readers,
such as ``pandas.read_csv``. Consult `your Pandas documentation for a full list of options <https://pandas.pydata.org/docs/reference/api/pandas.read_csv.html>`__. Since the ``'python'`` engine in Pandas is used for parsing,
only options supported by that engine are acceptable:<commit_msg>add docs badge to README<commit_after>gspread-dataframe
-----------------

.. image:: https://badge.fury.io/py/gspread-dataframe.svg
    :target: https://badge.fury.io/py/gspread-dataframe

.. image:: https://travis-ci.org/robin900/gspread-dataframe.svg?branch=master
    :target: https://travis-ci.org/robin900/gspread-dataframe

.. image:: https://img.shields.io/pypi/dm/gspread-dataframe.svg
    :target: https://pypi.org/project/gspread-dataframe

.. image:: https://readthedocs.org/projects/gspread-dataframe/badge/?version=latest
    :target: https://gspread-dataframe.readthedocs.io/en/latest/?badge=latest
    :alt: Documentation Status

This package allows easy data flow between a worksheet in a Google spreadsheet
and a Pandas DataFrame. Any worksheet you can obtain using the ``gspread`` package
can be retrieved as a DataFrame with ``get_as_dataframe``; DataFrame objects can
be written to a worksheet using ``set_with_dataframe``:

.. code:: 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)

The ``get_as_dataframe`` function supports the keyword arguments
that are supported by your Pandas version's text parsing readers,
such as ``pandas.read_csv``. Consult `your Pandas documentation for a full list of options <https://pandas.pydata.org/docs/reference/api/pandas.read_csv.html>`__. Since the ``'python'`` engine in Pandas is used for parsing,
only options supported by that engine are acceptable:
{'fraction_non_alphanumeric': 0.11935585727818124, 'fraction_numerical': 0.006946637196084623, 'mean_word_length': 4.387755102040816, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 16, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1108226', 'n_tokens_mistral': 1060, 'n_tokens_neox': 991, 'n_words': 276}