Skip to content

Commit a0c8896

Browse files
committed
AutomatedDataReporting
1 parent 0ee50ad commit a0c8896

File tree

3 files changed

+52
-1
lines changed

3 files changed

+52
-1
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import pandas as pd
2+
3+
def generate_data_report(data_file_path, report_file_path):
4+
df = pd.read_csv(data_file_path)
5+
6+
summary_statistics = df.describe()
7+
column_means = df.mean()
8+
column_max_values = df.max()
9+
column_min_values = df.min()
10+
11+
with open(report_file_path, 'w') as report_file:
12+
report_file.write("Data Report\n")
13+
report_file.write("Summary Statistics:\n")
14+
report_file.write(str(summary_statistics) + "\n\n")
15+
report_file.write("Column Means:\n")
16+
report_file.write(str(column_means) + "\n\n")
17+
report_file.write("Column Maximum Values:\n")
18+
report_file.write(str(column_max_values) + "\n\n")
19+
report_file.write("Column Minimum Values:\n")
20+
report_file.write(str(column_min_values))
21+
22+
if __name__ == "__main__":
23+
data_file_path = "path/to/your/data.csv"
24+
report_file_path = "path/to/your/report.csv"
25+
26+
generate_data_report(data_file_path, report_file_path)
27+
print("Data report generated successfully!")

AutomatedDataReporting/Readme.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Data Report Generator
2+
3+
[![Python Version](https://img.shields.io/badge/python-3.7%2B-blue)](https://www.python.org/downloads/release/python-370/)
4+
5+
A Python script that automates the process of generating data reports from CSV files.
6+
7+
8+
## Introduction
9+
10+
Data Report Generator is a Python script that simplifies the task of generating data reports from CSV files. It uses the Pandas library to perform basic data analysis and calculations on the input data and outputs the results into a new CSV report file.
11+
12+
## Features
13+
14+
- Read data from CSV files
15+
- Calculate summary statistics
16+
- Calculate column means, maximum values, and minimum values
17+
- Write the data report to a new CSV file
18+
19+
## Prerequisites
20+
21+
- Python 3.7 or higher
22+
- Pandas library
23+

SCRIPTS.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,4 +118,5 @@
118118
| 109\. | Fetch Contributions | This script is a Python tool that fetches pull requests made by a user in a GitHub organization. | [Take Me](./Fetch_Contributions/) | [Sabhi Sharma](https//github.com/sabhisharma-ise)
119119
| 109\. | Domain Name Availability Checker | This script is a Python tool that allows you to check the availability of domain names using the GoDaddy API. | [Take Me](./Domain_Name_Availability/) | [Sabhi Sharma](https//github.com/sabhisharma-ise)
120120
| 110\. | Automatic Spelling Checker and Corrector | This Script is used to detect spelling errors in a text and correct them if the user wishes to do so. | [Take Me](./Automatic_Spelling_Checker_Corrector/) | [Sabhi Sharma](https//github.com/sabhisharma-ise)
121-
| 111\. | File Searcher | The File Search script is a Python tool that allows you to search for files with a specific extension in a directory. It recursively searches through all subdirectories of the specified directory and returns a list of files that match the provided file extension. | [Take Me](https://github.com/avinashkranjan/Amazing-Python-Scripts/tree/master/File\Search) | [Srujana Vanka](https://github.com/srujana-16)
121+
| 111\. | File Searcher | The File Search script is a Python tool that allows you to search for files with a specific extension in a directory. It recursively searches through all subdirectories of the specified directory and returns a list of files that match the provided file extension. | [Take Me](https://github.com/avinashkranjan/Amazing-Python-Scripts/tree/master/File\Search) | [Srujana Vanka](https://github.com/srujana-16)
122+
| 112\. | Automated Data Reporting | A Python script that automates the process of generating data reports from CSV files. | [Take Me](https://github.com/avinashkranjan/Amazing-Python-Scripts/tree/master/AutomatedDataReporting) | [Shraddha Singh](https://github.com/shraddha761)

0 commit comments

Comments
 (0)