Documentation
Data Ingestion
CSV Connector

Module: csv_connector.py

Class and Functions

CSVConnector

class CSVConnector:
    """
    CSVConnector facilitates reading data from CSV files.
    """
 
 
def __init__(self, file_path):
    """
    Initializes the CSVConnector with the path to the folder containing CSV files.
    """
 
 
def fetch_data(self):
    """
    Reads data from a CSV file.
 
    Parameters:
        filename (str): Name of the CSV file to read.
 
    Returns:
        result (DataFrame): A pandas DataFrame containing the data from the CSV file.
    """
 
 
def new_data(self, data):
    """
    Saves data to a CSV file.
 
    Parameters:
        data (DataFrame): Data to be saved to the CSV file.
        filename (str): Name of the CSV file to save.
 
    Returns:
        None
    """
 
 
def append_to_csv(self, data):
    """
    Appends data to an existing CSV file.
 
    Parameters:
        file_path (str): Path to the CSV file.
        data (DataFrame): Data to be appended to the CSV file.
 
    Returns:
        None
    """