Hi All ,
we want to impletement the ETL Process in pythan , can anyone share simple code with working example.
Thanks
karthik. K
Hi All ,
we want to impletement the ETL Process in pythan , can anyone share simple code with working example.
Thanks
karthik. K
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Amit MohantyPosted Aug 22, 2023, 12:01 PM
Let's assume you have a CSV file named "input_data.csv" with the following content:
We want to transform it by adding a "birth_year" column based on the current year (2023).
After running the above code, we'll get a new CSV file named "transformed_data.csv" with the following content:
Before running the above code, make sure you have the
pandaslibrary installed.Karthik KPosted Aug 24, 2023, 1:48 AM
Thanks to all for vital respones .
I have share my code. In that i had two issue kindly anyone look into this provide some solution for this.
#1. where do i need to define the Input file path / Output file Path
#2. i got a warning like , " Unresolved import 'src.transform ' "
Thanks in advance ,
Karthik .K
Cr BhargaviPosted Aug 23, 2023, 4:03 AM
Mohammad HussainPosted Aug 22, 2023, 3:39 PM
Here is the just a basic example of how to extract data from a CSV file and load into SQL using Python.
Please note that you'll need to install the necessary libraries if you haven't already:
Now, let's go through the ETL process:
Deepak RawatPosted Aug 22, 2023, 11:35 AM
Before running the code, make sure you have the
pandaslibrary installed. You can install it usingpipif you haven't already:Here's a simple example code:
Replace
'old_column_name'and'new_column_name'with the appropriate column names you want to change in the transformation step. Also, replace'data.csv'with the path to your CSV file and'my_database.db'with the desired path for your SQLite database file.