Your cart is currently empty!
Is Python good for data transformation?
Hi I am Ramon from Excel in Bi, I would give you my perspective in how Python helped me to start on my data journey.
Definitely yes, Python is the most efficient tool I’ve found so far for transforming data. Here’s how I started learning and using it:
1. I faced a problem that Excel could no longer handle.
2. I began researching tools that could help me transform data more efficiently.
3. I tested Excel Macros with VBA, but they didn’t work well on my Mac.
4. I tried Power BI to transform data in a table—it worked, but felt limited and didn’t suit my needs.
5. Then I discovered Python: a cross-platform language and tool that solved my Excel-related challenges.
⸻
At the time, I was working with a large Excel file containing stock market data, symbols like Tesla, Microsoft, etc. My goal was to forecast how these stocks would perform in the future. But just building a forecast for a single stock took me days. And every day, I had to repeat the same manual process. It simply wasn’t a scalable way to build an investment plan.
Then I discovered that Python is widely used for stock market forecasting. When I saw that everything I had spent a full day doing in Excel could be reduced to fewer than 50 lines of Python code, I realised I had been approaching the problem the wrong way.
Here’s an example:
Below is a simple Python script that forecasts stock performance for a company like Microsoft. The entire process takes about 30 seconds—or even less—to run.
import yfinance as yf
import pandas as pd
from prophet import Prophet
import matplotlib.pyplot as plt
# Step 1: Download historical stock data
ticker = 'MSFT'
df = yf.download(ticker, start='2020-01-01', end='2024-12-31')
# Step 2: Prepare data for Prophet
df = df.reset_index()
df = df[['Date', 'Close']]
df.columns = ['ds', 'y'] # Prophet expects columns to be named 'ds' (date) and 'y' (value)
# Step 3: Create and fit the model
model = Prophet(daily_seasonality=True)
model.fit(df)
# Step 4: Make future dataframe for 90 days
future = model.make_future_dataframe(periods=90)
# Step 5: Forecast
forecast = model.predict(future)
# Step 6: Plot the forecast
model.plot(forecast)
plt.title(f"{ticker} Stock Price Forecast")
plt.xlabel("Date")
plt.ylabel("Price (USD)")
plt.show()
That blew my mind.
From there, I kept pushing the limits:
First 5 stock symbols, then hundreds, then thousands daily. Eventually, I had to laugh—I wasn’t even investing yet! I was just obsessed with building better forecasts.
⸻
The best part? I learned the basics of Python without even realising it, thanks to Stack Overflow, GitHub, and ChatGPT. The learning curve was surprisingly smooth with the right support.
Now, as a Data Specialist and Instructor, Python is my go-to tool for:
• Data transformation
• Automation
• Designing and managing large-scale data ingestion pipelines
• Building analytics systems that generate real business insights
⸻
There are best practices and frameworks that will help you succeed in your role as a Data Engineer or Analyst using Python. At Excel in BI, we teach you how to implement these systems and build powerful, scalable data pipelines.
👉 Check out our [Python for Data Transformation course], or join one of our free webinars to unlock the superpowers of Python and other amazing tools for your data journey.