Spaces:
Runtime error
Runtime error
File size: 735 Bytes
92b63f0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
from zenml import step
import pandas as pd
import logging
from src.data_ingestion import DataIngestion
@step
def data_ingestion_step(file_path:str)->pd.DataFrame:
"""
Data ingestion step.
This step takes in a pandas DataFrame and performs the necessary data ingestion steps.
Parameters:
df (pd.DataFrame): The input DataFrame.
Returns:
pd.DataFrame: The ingested data.
"""
logging.basicConfig(
level=logging.INFO,
format='%(asctime)s - %(levelname)s - %(message)s',
handlers=[
logging.FileHandler("logging.log",'w+'),
logging.StreamHandler()
]
)
data_ingest = DataIngestion()
data = data_ingest.data_ingestion(file_path)
return data
|