Module library.script

Expand source code
import tempfile

import pandas as pd


def df_to_tempfile(df: pd.DataFrame) -> str:
    f = tempfile.NamedTemporaryFile(delete=False, suffix=".csv")
    df.to_csv(f, index=False)
    return f.name

Sub-modules

library.script.bpl_libraries
library.script.doe_lcgms
library.script.doe_pepmeetingurls
library.script.dpr_capitalprojects
library.script.nypl_libraries
library.script.uscourts_courts

Functions

def df_to_tempfile(df: pandas.core.frame.DataFrame) ‑> str
Expand source code
def df_to_tempfile(df: pd.DataFrame) -> str:
    f = tempfile.NamedTemporaryFile(delete=False, suffix=".csv")
    df.to_csv(f, index=False)
    return f.name