-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
220 lines (201 loc) · 9.2 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
#!/usr/bin/python3
from colorama import Fore
import getpass
def DEFAULT():
print(
Fore.LIGHTGREEN_EX+
" ____ _ ____ \n"+
"| _ \ __ _| |_ __ _| _ \ __ _ _ __ ___ ___ \n"+
"| | | |/ _` | __/ _` | |_) / _` | '__/ __|/ _ \\\n"+
"| |_| | (_| | || (_| | __/ (_| | | \__ \ __/\n"+
"|____/ \__,_|\__\__,_|_| \__,_|_| |___/\___|\n"
)
while True:
# Options
print(
Fore.WHITE+
f"-----------------------------\n"+
f"{Fore.LIGHTGREEN_EX}+{Fore.WHITE} Functions --> 1\n"+
f"{Fore.LIGHTGREEN_EX}+{Fore.WHITE} MathMatics --> 2\n"+
f"{Fore.LIGHTGREEN_EX}+{Fore.WHITE} Display --> 3\n"+
f"\n"+
f"-----------------------------"+
f"\n"
)
USER = input(f"{Fore.WHITE}{getpass.getuser()}@DataParse$ ")
if USER == "1":
# Options
while True:
print(
"\n"
f"{Fore.LIGHTGREEN_EX}+{Fore.WHITE} ConCat --> 1\n"+
f"{Fore.LIGHTGREEN_EX}+{Fore.WHITE} DropNA --> 2\n"+
f"{Fore.LIGHTGREEN_EX}+{Fore.WHITE} DropColumn --> 3\n"+
f"{Fore.LIGHTGREEN_EX}+{Fore.WHITE} DropRow --> 4\n"+
f"{Fore.LIGHTGREEN_EX}+{Fore.WHITE} DropDuplicates --> 5\n"+
f"{Fore.LIGHTGREEN_EX}+{Fore.WHITE} ConvertToDateTime --> 6\n"+
f"{Fore.LIGHTGREEN_EX}+{Fore.WHITE} ConvertToInt --> 7\n"+
f"{Fore.LIGHTGREEN_EX}+{Fore.WHITE} ExtractDate --> 8\n"+
f"\n"+
f"-----------------------------"+
f"\n"
)
USER = input(f"{Fore.WHITE}{getpass.getuser()}@DataParse$ ")
if USER == '1':
import functions.concat as CONCAT
print(f"{Fore.WHITE}[ OK ] ConCat Selected")
CONCAT.Easy_Option()
break
elif USER == '2':
import functions.dropna as DROPNA
print(f"{Fore.WHITE}[ OK ] DropNA Selected")
DROPNA.Easy_Option()
break
elif USER == '3':
import functions.dropgroup as DROPCOLUMN
print(f"{Fore.WHITE}[ OK ] DropColumn Selected")
DROPCOLUMN.Easy_Option()
break
elif USER == '4':
import functions.droprow as DROPROW
print(f"{Fore.WHITE}[ OK ] DropRow Selected")
DROPROW.Easy_Option()
break
elif USER == '5':
import functions.dropduplicates as DROPDUPLICATES
print(f"{Fore.WHITE}[ OK ] DropDuplicates Selected")
DROPDUPLICATES.Easy_Option()
break
elif USER == '6':
import functions.datetime as DATETIME
print(f"{Fore.WHITE}[ OK ] ConvertToDateTime")
DATETIME.Easy_Option()
break
elif USER == '7':
import functions.int as INT
print(f"{Fore.WHITE}[ OK ] ConvertToInt")
INT.Easy_Option()
break
elif USER == '8':
import functions.datetime_sep as DATETIME_SEP
print(f"{Fore.WHITE}[ OK ] ExtractDate")
DATETIME_SEP.Easy_Option()
break
else:
print(f"{Fore.RED}[ ! ] Invaild Option, Try again")
elif USER == "2":
# Options
while True:
print(
"\n"+
f"{Fore.LIGHTGREEN_EX}+{Fore.WHITE} Statics --> 1\n"+
f"{Fore.LIGHTGREEN_EX}+{Fore.WHITE} Operations --> 2\n"+
f"{Fore.LIGHTGREEN_EX}+{Fore.WHITE} equations --> 3\n"+
f"\n"+
f"-----------------------------"+
f"\n"
)
USER = input(f"{Fore.WHITE}{getpass.getuser()}@DataParse$ ")
if USER == '1':
import mathmatics_functions.statics as STATICS
print(f"{Fore.WHITE}[ OK ] Statics Selected")
STATICS.Easy_Option()
break
elif USER == '2':
while True:
# Options
print(
"\n"+
f"{Fore.LIGHTGREEN_EX}+{Fore.WHITE} Sum --> 1\n"+
f"{Fore.LIGHTGREEN_EX}+{Fore.WHITE} Minus --> 2\n"+
f"{Fore.LIGHTGREEN_EX}+{Fore.WHITE} Multiply --> 3\n"+
f"{Fore.LIGHTGREEN_EX}+{Fore.WHITE} Divide --> 4\n"+
f"\n"+
f"-----------------------------"+
f"\n"
)
USER = input(f"{Fore.WHITE}{getpass.getuser()}@DataParse$ ")
if USER == "1":
import mathmatics_functions.sum as SUM
print(f"{Fore.WHITE}[ OK ] Sum Selected")
SUM.Easy_Option()
break
elif USER == "2":
import mathmatics_functions.minus as MINUS
print(f"{Fore.WHITE}[ OK ] Minus Selected")
MINUS.Easy_Option()
break
elif USER == "3":
import mathmatics_functions.multiply as MULTIPLY
print(f"{Fore.WHITE}[ OK ] Multiply Selected")
MULTIPLY.Easy_Option()
break
elif USER == "4":
import mathmatics_functions.divide as DIVIDE
print(f"{Fore.WHITE}[ OK ] Divide Selected")
DIVIDE.Easy_Option()
break
else:
print(f"{Fore.RED}[ ! ] Invaild Option, Try again")
break
elif USER == "3":
while True:
# Options
print(
"\n"+
f"{Fore.LIGHTGREEN_EX}+{Fore.WHITE} Linear --> 1\n"+
f"{Fore.LIGHTGREEN_EX}+{Fore.WHITE} Polynomial --> 2\n"+
f"\n"+
f"-----------------------------"+
f"\n"
)
USER = input(f"{Fore.WHITE}{getpass.getuser()}@DataParse$ ")
if USER == "1":
import equations.linear as LINEAR
print(f"{Fore.WHITE}[ OK ] linear Selected")
LINEAR.Easy_Option()
break
elif USER == "2":
import equations.polynomial as POLYNOMIAL
print(f"{Fore.WHITE}[ OK ] Polynomial Selected")
POLYNOMIAL.Easy_Option()
break
else:
print(f"{Fore.RED}[ ! ] Invaild Option, Try again")
break
else:
print(f"{Fore.RED}[ ! ] Invaild Option, Try again")
elif USER == "3":
# Options
print(
f"-----------------------------\n"+
f"{Fore.LIGHTGREEN_EX}+{Fore.WHITE} Histogram --> 1\n"+
f"{Fore.LIGHTGREEN_EX}+{Fore.WHITE} Bar --> 2\n"+
f"{Fore.LIGHTGREEN_EX}+{Fore.WHITE} Plot --> 3\n"+
f"{Fore.LIGHTGREEN_EX}+{Fore.WHITE} Scatter --> 4\n"+
"\n"+
f"-----------------------------"+
"\n"
)
USER = input(f"{Fore.WHITE}{getpass.getuser()}@DataParse$ ")
if USER == "1":
import display.hist as HIST
print(f"{Fore.WHITE}[ OK ] Histogram Selected")
HIST.Easy_Option()
elif USER == "2":
import display.bar as BAR
print(f"{Fore.WHITE}[ OK ] bar Selected")
BAR.Easy_Option()
elif USER == "3":
import display.plot as PLOT
print(f"{Fore.WHITE}[ OK ] Plot Selected")
PLOT.Easy_Option()
elif USER == "4":
import display.scatter as SCATTER
print(f"{Fore.WHITE}[ OK ] Scatter Selected")
SCATTER.Easy_Option()
else:
print(f"{Fore.RED}[ ! ] Invaild Option, Try again")
else:
print(f"{Fore.RED}[ ! ] Invaild Option, Try again")
DEFAULT()