switch_model/wecc/get_inputs/get_inputs.py
def write_csv_from_query(cursor, fname: str, headers: List[str], query: str):
    """Create CSV file from cursor."""
    print(f"\t{fname}.csv... ", flush=True, end="")
    cursor.execute(query)
    data = cursor.fetchall()
    write_csv(data, fname, headers, log=False)
    print(len(data))
    if not data:
        warnings.warn(f"File {fname} is empty.")
Create CSV file from cursor.
Create CSV file from cursor.
Create CSV file from cursor .
def write_csv_from_query(cursor, fname: str, headers: List[str], query: str):
    print(f"\t{fname}.csv... ", flush=True, end="")
    cursor.execute(query)
    data = cursor.fetchall()
    write_csv(data, fname, headers, log=False)
    print(len(data))
    if not data:
        warnings.warn(f"File {fname} is empty.")
def write_csv_from_query ( cursor , fname : str , headers : List [ str ] , query : str ) : print ( f"\t{fname}.csv... " , flush = True , end = "" ) cursor . execute ( query ) data = cursor . fetchall ( ) write_csv ( data , fname , headers , log = False ) print ( len ( data ) ) if not data : warnings . warn ( f"File {fname} is empty." )
Create CSV file from cursor.
Create CSV file from cursor .
"""Create CSV file from cursor."""
cursor
fname
str
headers
List[str]
query
str