hotiq 1.0.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.
hotiq-1.0.0/PKG-INFO ADDED
@@ -0,0 +1,6 @@
1
+ Metadata-Version: 2.4
2
+ Name: hotiq
3
+ Version: 1.0.0
4
+ Summary: Simple data preprocessing code helper for Python
5
+ Author: Abhinav B Prasad
6
+ Requires-Python: >=3.9
@@ -0,0 +1,6 @@
1
+ Metadata-Version: 2.4
2
+ Name: hotiq
3
+ Version: 1.0.0
4
+ Summary: Simple data preprocessing code helper for Python
5
+ Author: Abhinav B Prasad
6
+ Requires-Python: >=3.9
@@ -0,0 +1,7 @@
1
+ pyproject.toml
2
+ hotiq.egg-info/PKG-INFO
3
+ hotiq.egg-info/SOURCES.txt
4
+ hotiq.egg-info/dependency_links.txt
5
+ hotiq.egg-info/top_level.txt
6
+ preprocessor_helper/__init__.py
7
+ preprocessor_helper/codes.py
@@ -0,0 +1,2 @@
1
+ dist
2
+ preprocessor_helper
@@ -0,0 +1 @@
1
+ from .codes import *
@@ -0,0 +1,109 @@
1
+ def basic_code():
2
+ print('''
3
+ import pandas as pd
4
+ import numpy as np
5
+
6
+ df = pd.read_csv("train.csv")
7
+
8
+ print(df.head())
9
+ print(df.shape)
10
+ df.info()
11
+ print(df.describe())
12
+ ''')
13
+
14
+
15
+ def missing_code():
16
+ print('''
17
+ print(df.isnull().sum())
18
+
19
+ df["Age"] = df["Age"].fillna(df["Age"].median())
20
+
21
+ df["Embarked"] = df["Embarked"].fillna(
22
+ df["Embarked"].mode()[0]
23
+ )
24
+
25
+ df.drop("Cabin", axis=1, inplace=True)
26
+ ''')
27
+
28
+
29
+ def duplicate_code():
30
+ print('''
31
+ print(df.duplicated().sum())
32
+
33
+ df.drop_duplicates(inplace=True)
34
+ ''')
35
+
36
+
37
+ def add_column_code():
38
+ print('''
39
+ # Add a new column with a constant value
40
+ df["New_Column"] = 0
41
+
42
+ # Titanic example: Family Size
43
+ df["FamilySize"] = df["SibSp"] + df["Parch"] + 1
44
+
45
+ # Titanic example: Age Group
46
+ df["AgeGroup"] = pd.cut(
47
+ df["Age"],
48
+ bins=[0, 18, 40, 60, 100],
49
+ labels=["Child", "Adult", "Middle Age", "Senior"]
50
+ )
51
+
52
+ print(df.head())
53
+ ''')
54
+
55
+
56
+ def drop_column_code():
57
+ print('''
58
+ df.drop(
59
+ ["PassengerId", "Name", "Ticket"],
60
+ axis=1,
61
+ inplace=True
62
+ )
63
+ ''')
64
+
65
+
66
+ def encoding_code():
67
+ print('''
68
+ from sklearn.preprocessing import LabelEncoder
69
+
70
+ le = LabelEncoder()
71
+
72
+ df["Sex"] = le.fit_transform(df["Sex"])
73
+ df["Embarked"] = le.fit_transform(df["Embarked"])
74
+ ''')
75
+
76
+
77
+ def scaling_code():
78
+ print('''
79
+ from sklearn.preprocessing import MinMaxScaler
80
+
81
+ scaler = MinMaxScaler()
82
+
83
+ df[["Age", "Fare"]] = scaler.fit_transform(
84
+ df[["Age", "Fare"]]
85
+ )
86
+ ''')
87
+
88
+
89
+ def show_code():
90
+ print("========== BASIC DATA CHECKING ==========")
91
+ basic_code()
92
+
93
+ print("========== MISSING VALUES ==========")
94
+ missing_code()
95
+
96
+ print("========== DUPLICATE VALUES ==========")
97
+ duplicate_code()
98
+
99
+ print("========== ADDING COLUMNS ==========")
100
+ add_column_code()
101
+
102
+ print("========== DROPPING COLUMNS ==========")
103
+ drop_column_code()
104
+
105
+ print("========== ENCODING ==========")
106
+ encoding_code()
107
+
108
+ print("========== SCALING ==========")
109
+ scaling_code()
@@ -0,0 +1,16 @@
1
+ [build-system]
2
+ requires = ["setuptools>=77"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "hotiq"
7
+ version = "1.0.0"
8
+ description = "Simple data preprocessing code helper for Python"
9
+ requires-python = ">=3.9"
10
+
11
+ authors = [
12
+ {name = "Abhinav B Prasad"}
13
+ ]
14
+
15
+ [tool.setuptools.packages.find]
16
+ where = ["."]
hotiq-1.0.0/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+