analystkit 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,55 @@
1
+ Metadata-Version: 2.4
2
+ Name: analystkit
3
+ Version: 0.1.0
4
+ Summary: Python library for data profiling and dataset reporting.
5
+ Author: hasansayyed
6
+ Requires-Python: >=3.8
7
+ Description-Content-Type: text/markdown
8
+
9
+ # AnalystKit 📊
10
+
11
+ AnalystKit is a Python library for quick data profiling and dataset reporting. Generate detailed reports for CSV files with a single function call.
12
+
13
+ ## Features
14
+
15
+ - Dataset Overview
16
+ - Column Information
17
+ - Data Type Analysis
18
+ - Null Value Report
19
+ - Missing Value Percentage
20
+ - Duplicate Detection
21
+ - Statistical Summary
22
+ - Memory Usage Analysis
23
+ - Sample Data Preview
24
+ - Save Reports to TXT
25
+
26
+ ## Installation
27
+
28
+ ```bash
29
+ pip install analystkit
30
+ ```
31
+
32
+ ## Usage
33
+
34
+ ```python
35
+ from analystkit import generate_reports
36
+
37
+ files = {
38
+ "employees": "employees.csv",
39
+ "sales": "sales.csv"
40
+ }
41
+
42
+ generate_reports(files)
43
+ ```
44
+
45
+ ## Save Report
46
+
47
+ ```python
48
+ from analystkit import save_reports
49
+
50
+ save_reports(files, "report.txt")
51
+ ```
52
+
53
+ ## Author
54
+ hasansayyed
55
+
@@ -0,0 +1,47 @@
1
+ # AnalystKit 📊
2
+
3
+ AnalystKit is a Python library for quick data profiling and dataset reporting. Generate detailed reports for CSV files with a single function call.
4
+
5
+ ## Features
6
+
7
+ - Dataset Overview
8
+ - Column Information
9
+ - Data Type Analysis
10
+ - Null Value Report
11
+ - Missing Value Percentage
12
+ - Duplicate Detection
13
+ - Statistical Summary
14
+ - Memory Usage Analysis
15
+ - Sample Data Preview
16
+ - Save Reports to TXT
17
+
18
+ ## Installation
19
+
20
+ ```bash
21
+ pip install analystkit
22
+ ```
23
+
24
+ ## Usage
25
+
26
+ ```python
27
+ from analystkit import generate_reports
28
+
29
+ files = {
30
+ "employees": "employees.csv",
31
+ "sales": "sales.csv"
32
+ }
33
+
34
+ generate_reports(files)
35
+ ```
36
+
37
+ ## Save Report
38
+
39
+ ```python
40
+ from analystkit import save_reports
41
+
42
+ save_reports(files, "report.txt")
43
+ ```
44
+
45
+ ## Author
46
+ hasansayyed
47
+
File without changes
@@ -0,0 +1,157 @@
1
+ from pandas import read_csv
2
+
3
+
4
+ # show reports in terminal
5
+ def generate_reports(files: dict):
6
+ import io
7
+ import pandas as pd
8
+
9
+ for name, file in files.items():
10
+
11
+ df = pd.read_csv(file)
12
+
13
+ buffer = io.StringIO()
14
+ df.info(buf=buffer)
15
+
16
+ print(f"\n{'=' * 50}")
17
+ print(f"DATA REPORT : {name}")
18
+ print(f"{'=' * 50}")
19
+
20
+ # Dataset Overview
21
+ print(f"\nRows: {df.shape[0]}")
22
+ print(f"Columns: {df.shape[1]}")
23
+
24
+ # Duplicate Analysis
25
+ print(f"\nDuplicate Rows: {df.duplicated().sum()}")
26
+
27
+ # Null Analysis
28
+ total_nulls = df.isnull().sum().sum()
29
+ total_cells = df.shape[0] * df.shape[1]
30
+
31
+ null_percentage = (
32
+ total_nulls / total_cells * 100
33
+ if total_cells > 0 else 0
34
+ )
35
+
36
+ print(f"Missing Values: {total_nulls}")
37
+ print(f"Missing Value Percentage: {null_percentage:.2f}%")
38
+
39
+ # Memory Usage Analysis
40
+ memory_usage = (
41
+ df.memory_usage(deep=True).sum()
42
+ / 1024**2
43
+ )
44
+
45
+ print(f"Memory Usage: {memory_usage:.2f} MB")
46
+
47
+ # Column Information
48
+ print("\nColumn Names:")
49
+ print(df.columns.tolist())
50
+
51
+ # Data Type Analysis
52
+ print("\nData Types:")
53
+ print(df.dtypes)
54
+
55
+ # Data Information
56
+ print("\nData Information:")
57
+ print(buffer.getvalue())
58
+
59
+ # Statistical Summary
60
+ print("\nStatistical Summary:")
61
+ print(df.describe(include="all"))
62
+
63
+ # Sample Data
64
+ print("\nSample Data:")
65
+ print(df.sample(min(3, len(df))))
66
+
67
+ print(f"\n{'=' * 50}")
68
+
69
+
70
+ # save reports as text_file
71
+ def save_reports(files: dict, filename="report.txt"):
72
+ import io
73
+ import pandas as pd
74
+
75
+ with open(filename, "w", encoding="utf-8") as f:
76
+
77
+ for name, file in files.items():
78
+
79
+ df = pd.read_csv(file)
80
+
81
+ total_nulls = df.isnull().sum().sum()
82
+ total_cells = df.shape[0] * df.shape[1]
83
+
84
+ null_percentage = (
85
+ total_nulls / total_cells * 100
86
+ if total_cells > 0 else 0
87
+ )
88
+
89
+ memory_usage = (
90
+ df.memory_usage(deep=True).sum()
91
+ / 1024**2
92
+ )
93
+
94
+ f.write(f"\n{'=' * 60}\n")
95
+ f.write(f"DATA REPORT OF {name}\n")
96
+ f.write(f"{'=' * 60}\n")
97
+
98
+ # Dataset Overview
99
+ f.write(f"\nTotal Rows: {df.shape[0]}\n")
100
+ f.write(f"Total Columns: {df.shape[1]}\n")
101
+
102
+ # Duplicate Analysis
103
+ f.write(f"\nTotal Duplicates: {df.duplicated().sum()}\n")
104
+
105
+ # Null Analysis
106
+ f.write(f"\nTotal Missing Values: {total_nulls}\n")
107
+ f.write(
108
+ f"Missing Value Percentage: "
109
+ f"{null_percentage:.2f}%\n"
110
+ )
111
+
112
+ # Memory Usage
113
+ f.write(
114
+ f"Memory Usage: "
115
+ f"{memory_usage:.2f} MB\n"
116
+ )
117
+
118
+ # Column Names
119
+ f.write("\nColumn Names:\n")
120
+ f.write("\n".join(df.columns.astype(str)))
121
+ f.write("\n")
122
+
123
+ # Data Types
124
+ f.write("\nData Types:\n")
125
+ f.write(df.dtypes.to_string())
126
+ f.write("\n")
127
+
128
+ # Missing Values By Column
129
+ f.write("\nMissing Values By Column:\n")
130
+ f.write(df.isnull().sum().to_string())
131
+ f.write("\n")
132
+
133
+ # Data Info
134
+ f.write("\nData Information:\n")
135
+ buffer = io.StringIO()
136
+ df.info(buf=buffer)
137
+ f.write(buffer.getvalue())
138
+
139
+ # Statistics
140
+ f.write("\nStatistical Summary:\n")
141
+ f.write(
142
+ df.describe(include="all")
143
+ .to_string()
144
+ )
145
+
146
+ # Sample Data
147
+ f.write("\n\nSample Data:\n")
148
+ f.write(
149
+ df.sample(min(5, len(df)))
150
+ .to_string()
151
+ )
152
+
153
+ f.write(f"\n\n{'=' * 60}\n")
154
+
155
+ print(
156
+ f"✅ Report saved successfully in {filename}"
157
+ )
@@ -0,0 +1,55 @@
1
+ Metadata-Version: 2.4
2
+ Name: analystkit
3
+ Version: 0.1.0
4
+ Summary: Python library for data profiling and dataset reporting.
5
+ Author: hasansayyed
6
+ Requires-Python: >=3.8
7
+ Description-Content-Type: text/markdown
8
+
9
+ # AnalystKit 📊
10
+
11
+ AnalystKit is a Python library for quick data profiling and dataset reporting. Generate detailed reports for CSV files with a single function call.
12
+
13
+ ## Features
14
+
15
+ - Dataset Overview
16
+ - Column Information
17
+ - Data Type Analysis
18
+ - Null Value Report
19
+ - Missing Value Percentage
20
+ - Duplicate Detection
21
+ - Statistical Summary
22
+ - Memory Usage Analysis
23
+ - Sample Data Preview
24
+ - Save Reports to TXT
25
+
26
+ ## Installation
27
+
28
+ ```bash
29
+ pip install analystkit
30
+ ```
31
+
32
+ ## Usage
33
+
34
+ ```python
35
+ from analystkit import generate_reports
36
+
37
+ files = {
38
+ "employees": "employees.csv",
39
+ "sales": "sales.csv"
40
+ }
41
+
42
+ generate_reports(files)
43
+ ```
44
+
45
+ ## Save Report
46
+
47
+ ```python
48
+ from analystkit import save_reports
49
+
50
+ save_reports(files, "report.txt")
51
+ ```
52
+
53
+ ## Author
54
+ hasansayyed
55
+
@@ -0,0 +1,8 @@
1
+ README.md
2
+ pyproject.toml
3
+ analystkit/__init__.py
4
+ analystkit/reports.py
5
+ analystkit.egg-info/PKG-INFO
6
+ analystkit.egg-info/SOURCES.txt
7
+ analystkit.egg-info/dependency_links.txt
8
+ analystkit.egg-info/top_level.txt
@@ -0,0 +1 @@
1
+ analystkit
@@ -0,0 +1,13 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "analystkit"
7
+ version = "0.1.0"
8
+ description = "Python library for data profiling and dataset reporting."
9
+ readme = "README.md"
10
+ requires-python = ">=3.8"
11
+ authors = [
12
+ {name = "hasansayyed"}
13
+ ]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+