Anupam202224 commited on
Commit
ff73df1
·
verified ·
1 Parent(s): f17d9c2

Update data_ingestion

Browse files
Files changed (1) hide show
  1. data_ingestion +9 -0
data_ingestion CHANGED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ def data_ingestion(data_file):
2
+ try:
3
+ df = pd.read_csv(data_file) # This works better with Hugging Face file-like objects
4
+ data_pipelines["data_ingestion"] = df
5
+ log_event("Data ingestion completed successfully.")
6
+ return df.head()
7
+ except Exception as e:
8
+ log_event(f"Data ingestion failed: {str(e)}")
9
+ return f"Error: {str(e)}"