def _papers_to_records(df):
    """Convert a dataframe containing papers to s2 into records.

    Take a pandas dataframe from data downloaded from Semantic Scholar and
    convert into a list of dictionaries containing the data to write to a mysql
    database.

    Args:
        df: Pandas dataframe from s2 data.

    Returns:
        List[Dict]: Containing the records.
    """
    return (
        df.reset_index().drop(
            ['authors', 'inCitations', 'sources', 'pdfUrls', 'fieldsOfStudy'],
            axis=1
        )
        .rename(
            columns=dict(
                id='id_paper', paperAbstract='paper_abstract', s2Url='s2_url',
                journalName='journal_name', journalVolume='journal_volume',
                journalPages='journal_pages'
            )
        )
        .to_dict(orient='records')
    )