src/dbconnector.py
def create_csv_file(query: str, df_columns: list, file_title: str) -> None:
    """
    This function sends a query to the database and converts it to a csv
    
     Args:
        query (str): The query to convert to csv
        df_columns (list): column names of intended dataframe
        file_title (str): The title of the csv file

    Returns:
        None   
        
    """
    db = connect_engine()
    query_df = db.execute(query)
    results = query_df.fetchall()
    df = pd.DataFrame(results, columns= df_columns)
    df.to_csv(f'{file_title}.csv', index= False)

    This function sends a query to the database and converts it to a csv
    
     Args:
        query (str): The query to convert to csv
        df_columns (list): column names of intended dataframe
        file_title (str): The title of the csv file

    Returns:
        None   
        
    
This function sends a query to the database and converts it to a csv
Args:
query (str): The query to convert to csv
df_columns (list): column names of intended dataframe
file_title (str): The title of the csv file
This function sends a query to the database and converts it to a csv Args : query ( str ) : The query to convert to csv df_columns ( list ) : column names of intended dataframe file_title ( str ) : The title of the csv file
def create_csv_file(query: str, df_columns: list, file_title: str) -> None:
    db = connect_engine()
    query_df = db.execute(query)
    results = query_df.fetchall()
    df = pd.DataFrame(results, columns= df_columns)
    df.to_csv(f'{file_title}.csv', index= False)
def create_csv_file ( query : str , df_columns : list , file_title : str ) -> None : db = connect_engine ( ) query_df = db . execute ( query ) results = query_df . fetchall ( ) df = pd . DataFrame ( results , columns = df_columns ) df . to_csv ( f'{file_title}.csv' , index = False )
This function sends a query to the database and converts it to a csv
Args:
query (str): The query to convert to csv
df_columns (list): column names of intended dataframe
file_title (str): The title of the csv file
This function sends a query to the database and converts it to a csv Args : query ( str ) : The query to convert to csv df_columns ( list ) : column names of intended dataframe file_title ( str ) : The title of the csv file
"""
    This function sends a query to the database and converts it to a csv
    
     Args:
        query (str): The query to convert to csv
        df_columns (list): column names of intended dataframe
        file_title (str): The title of the csv file

    Returns:
        None   
        
    """
None
query
str
df_columns
list
file_title
str