Table and CSV analysis with AI; from cleaning to reporting
A practical path for tabular data analysis, detecting units and duplicate rows, and checking calculations; along with a small manageable sample.
Write the Question Before the Chart
"Analyze this table" usually leads to a long and unhelpful report. A clear question is better: Which category has the highest number of orders? Which rows are incomplete? Is the trend of the two months truly comparable? The type of question determines what columns you need.
Keep a working copy of the original file. If the table includes personal details, use sample data or an alternative identifier for practice. There is no need for names and contact numbers to remain in the file for calculating the order count.
Step One: Data Dictionary
Before calculating, ask the tool to suggest the name and meaning of each column and ask about ambiguous cases. Specify Persian and Gregorian dates, Rials and Tomans, percentages and fractions, and thousand separators. Empty values, zeros, and "N/A" should not be treated as identical without explanation.
Do not create reports or charts yet. List the columns, data types, and probable units. Show incomplete rows, invalid values, and potential duplicates separately. Write a reason for each proposed change and do not delete or replace data until my approval.
Step Two: A Small and Calculable Sample
| Category | Count | Amount per Item |
|---|---|---|
| A | 2 | 100 |
| B | 3 | 50 |
| A | 1 | 80 |
In this example, the total count is 6 and the total amount is 430: 2×100 + 3×50 + 1×80. The count for category A is 3, but its total amount is 280. These two metrics answer two different questions. Before analyzing the large file, evaluate the tool's result against this sample.
Step Three: Ask for the Calculation Method
Calculate the total count and amount broken down by category. Show the formula or calculation steps. Report the number of input rows and discarded rows. If you do not have code execution or calculation capabilities, state so explicitly and do not provide a guessed result.
For large data, a tool with code execution or actual calculation is more appropriate than purely textual answers. A pretty chart does not prove that the sums are correct; verify the grand total, row count, and a manual sample.
Step Four: Chart Appropriate to the Question
For comparing categories, start with a simple bar chart, and for trends over time, start with a line chart. The chart title must state the metric, unit, and time range. If two periods have different numbers of days or samples, decide on the average or a normalized metric before comparing.
Final Output
Ask the tool to provide the report in three sections: "What the data shows", "Probable interpretation", and "What we lack for a conclusion". This separation prevents turning correlation into a causal relationship.
Exercise: Add a duplicate row and an empty amount to the example. See if the tool detects them before calculating or silently makes assumptions. To review the report's claims, continue with the Fact-Checking AI Answers Guide.