Skip to content

Commit 318c2fb

Browse files
Merge pull request #2483 from shraddha761/mybranch
AutomatedDataReporting
2 parents 348c693 + bc69a19 commit 318c2fb

File tree

3 files changed

+51
-1
lines changed

3 files changed

+51
-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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@
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)
121121
| 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)
122123
| 112\. | Ludo Game | This python script will create a ludo game for the user to interact with it and play the game and enjoy the game. | [Take Me](./Ludo_Game) | [Avdhesh Varshney](https://github.com/Avdhesh-Varshney)
123124
| 112\. | Web Server Log Analysis Script | A Python script to parse and analyze web server logs to extract useful information such as visitor statistics, popular pages, and potential security threats. | [Take Me](https://github.com/avinashkranjan/Amazing-Python-Scripts/tree/master/WebServer) | [Shraddha Singh](https://github.com/shraddha761)
124125
| 112\. | Open Websites By Speaking | This python script can allow user to open any website just by speaking. | [Take Me](./Websites_Automation) | [Avdhesh Varshney](https://github.com/Avdhesh-Varshney)
125126
| 112\. | Advisor App | This python script allows user to give so many advices and motivation quote lines. | [Take Me](./Advisor_App) | [Avdhesh Varshney](https://github.com/Avdhesh-Varshney)
126-

0 commit comments

Comments
 (0)