Photo by the author Canva
“AI agents will become an integral part of our everyday life, helping us in everything, from planning terms to managing our finances. They will make our lives more convenient and efficient.”
—NANDREW NG
After the growing popularity of gigantic language models (LLM), AI agents are another great thing. As Andrew said, they will become part of our everyday life, but how will it affect the analytical flows of work? Could this be the end of manual data analysis or improve the existing workflow?
In this article, we tried to find the answer to this question and analyze the schedule to see if it is too early to do it or too tardy.
Data analysis past
Data analytics was not as basic or quick as today. In fact, he underwent several different phases. It is shaped by the technology of its time and the growing demand for making decisions based on data from companies and natural persons.
Microsoft Excel domination
In the 1990s and at the beginning of 2000 we used Microsoft Excel for everything. Remember about these school tasks or tasks in your workplace. It was necessary to combine columns and sort them by writing long formulas. There are not many sources where you can teach them, so the courses are very popular.
Enormous data sets would ponderous down this process, and the construction of the report was manual and repetitive.
SQL, Python, r
In the end, Excel did not fall. SQL entered here. And since then it is Rockstar. It is structured, scalable and quick. You probably remember when you first used SQL; In a few seconds he conducted an analysis.
R was there, but as Python’s enhance was also strengthened. Python is like talking to data because of its syntax. Now elaborate tasks can be completed within a few minutes. The companies also noticed and everyone was looking for talent that could work with SQL, Python and R. It was a modern standard.
Internet sciences everywhere
After 2018, a modern change took place. Tools such as Tableau and Power BI DO data analysis by clicking and offer amazing visualizations at the same time, called desktops. These tools without code have become so quickly popular, and all companies are now changing their position descriptions.
Powerbi or Tableau experiences are a must!
Future: LLMS input
Then gigantic language models enter the stage and what was the entrance! Everyone talks about LLM and tries to integrate them with work flow. You can see the titles of articles too often “,”Will LLM replace data analysts?“.
However, the first versions of LLM could not offer automatic data analysis until a chatgpt translator appeared. It was a breakthrough that frightens data analysts most, because it began to show that the flows of data analysis can be automatized only by clicking. How? Let’s see.
Data exploration using LLMS
Consider this data project: Shopping on Black Friday. It was used as an assignment for a home in the recruitment process for the data learning position at Walmart.
Here is a link to this data project: https://platform.stratascratch.com/data-projects/black-fliday-purchases
Visit, download the data set and send it to chatgpt. Employ this quick structure:
I have attached my dataset.
Here is my dataset description:
[Copy-paste from the platform]
Perform data exploration using visuals.
Here is the first part of the exit.
But it’s not over yet. He continues, so let’s see what else he has to show us.
Now we have a general summary of the data set and visualization. Let’s look at the third part of the data exploration, which is now oral.
The best part? It did it all in a few seconds. But AI agents are slightly more advanced. Let’s build an AI agent who automates data exploration.
Data analysis agents
The agents went a step further than the classic LLM interaction. As powerful as these LLM, it seemed that something was missing. Or maybe it is only an inevitable need for humanity to discover intelligence that exceeds their own? In the case of LLM, you had to ask them, as we did above, but in the case of data analysis agents, they don’t even need human intervention. They will do everything themselves.
Implementing agents for data research and visualization
Let’s build an agent together. To do this, we will employ Langchain and improved.
Agent configuration
Let’s install all libraries first.
import streamlit as st
import pandas as pd
warnings.filterwarnings('ignore')
from langchain_experimental.agents.agent_toolkits import create_pandas_dataframe_agent
from langchain_openai import ChatOpenAI
from langchain.agents.agent_types import AgentType
import io
import warnings
import matplotlib.pyplot as plt
import seaborn as sns
Our improved agent allows you to send a CSV or Excel file with this code.
api_key = "api-key-here"
st.set_page_config(page_title="Agentic Data Explorer", layout="wide")
st.title("Chat With Your Data — Agent + Visual Insights")
uploaded_file = st.file_uploader("Upload your CSV or Excel file", type=["csv", "xlsx"])
if uploaded_file:
# Read file
if uploaded_file.name.endswith(".csv"):
df = pd.read_csv(uploaded_file)
elif uploaded_file.name.endswith(".xlsx"):
df = pd.read_excel(uploaded_file)
Then there are data exploration codes and data visualization. As you can see, there are several if Blocks that will employ the code based on the characteristics of the data sets sent.
# --- Basic Exploration ---
st.subheader("📌 Data Preview")
st.dataframe(df.head())
st.subheader("🔎 Basic Statistics")
st.dataframe(df.describe())
st.subheader("📋 Column Info")
buffer = io.StringIO()
df.info(buf=buffer)
st.text(buffer.getvalue())
# --- Auto Visualizations ---
st.subheader("📊 Auto Visualizations (Top 2 Columns)")
numeric_cols = df.select_dtypes(include=["int64", "float64"]).columns.tolist()
categorical_cols = df.select_dtypes(include=["object", "category"]).columns.tolist()
if numeric_cols:
col = numeric_cols[0]
st.markdown(f"### Histogram for `{col}`")
fig, ax = plt.subplots()
sns.histplot(df[col].dropna(), kde=True, ax=ax)
st.pyplot(fig)
if categorical_cols:
# Limiting to the top 15 categories by count
top_cats = df[col].value_counts().head(15)
st.markdown(f"### Top 15 Categories in `{col}`")
fig, ax = plt.subplots()
top_cats.plot(kind='bar', ax=ax)
plt.xticks(rotation=45, ha="right")
st.pyplot(fig)
Then configure the agent.
st.divider()
st.subheader("🧠 Ask Anything to Your Data (Agent)")
prompt = st.text_input("Try: 'Which category has the highest average sales?'")
if prompt:
agent = create_pandas_dataframe_agent(
ChatOpenAI(
temperature=0,
model="gpt-3.5-turbo", # Or "gpt-4" if you have access
api_key=api_key
),
df,
verbose=True,
agent_type=AgentType.OPENAI_FUNCTIONS,
**{"allow_dangerous_code": True}
)
with st.spinner("Agent is thinking..."):
response = agent.invoke(prompt)
st.success("✅ Answer:")
st.markdown(f"> {response['output']}")
Agent testing
Now everything is ready. Save it as:
Then go to the working directory of this script file and run it with this code:
And Voila!
Your agent is ready, let’s check it!

Final thoughts
In this article, we have analyzed the evolution of data analysis from the 90s to this day, from Excel to LLM. We analyzed This real set of datawhich was asked in the actual interview for science, using CHATGPT.
Finally, we have developed an agent who automates data exploration and data visualization using SRTEL, Langchain and other Python libraries, which is an intersection of work flow from the past and a modern data analysis. And we did everything using a real data project.
Regardless of whether you adopt them today or tomorrow, AI agents are no longer a future trend; In fact, they are another phase of analysis.
Nate Rosidi He is a scientist of data and in the product strategy. He is also an analytical teacher and the founder of Stratascratch, platforms assist scientists to prepare for interviews with real questions from the highest companies. Nate writes about the latest trends on the career market, gives intelligence advice, divides data projects and includes everything SQL.
