Skip to content

Commit

Permalink
add info messages, modify code....
Browse files Browse the repository at this point in the history
  • Loading branch information
blaubaer01 committed Apr 10, 2022
1 parent 13163cc commit 2fde259
Show file tree
Hide file tree
Showing 8 changed files with 527 additions and 48 deletions.
101 changes: 93 additions & 8 deletions CSVpySTAT.py
Original file line number Diff line number Diff line change
Expand Up @@ -886,6 +886,15 @@ def table_statistics():
self.Scrolledtext1.insert(END, '\n')
self.Scrolledtext1.insert(END, 30*'#')

self.Scrolledtext1.insert(END, '\n')
self.Scrolledtext1.insert(END, 30*'#')
self.Scrolledtext1.insert(END, '\nDescriptive Statistics whoole Dataframe:')
self.Scrolledtext1.insert(END, '\nSave with file name: ' + filename + '\nInto root folder')
self.Scrolledtext1.insert(END, '\n')
self.Scrolledtext1.insert(END, 30*'#')



df_stats = df.describe(include='all')
df_stats.to_csv(filename, sep=';', decimal=',', header =True)
print(tabulate(df_stats, headers='keys', tablefmt='psql'))
Expand Down Expand Up @@ -1010,6 +1019,15 @@ def split_column():

df[[column_name,column_name + str(2)]] = df[column_name].str.split(delimeter_name,expand=True)

self.Scrolledtext1.insert(END, '\n')
self.Scrolledtext1.insert(END, 30*'#')
self.Scrolledtext1.insert(END, '\nSplit Column: ' + column_name )
self.Scrolledtext1.insert(END, '\nNew Column1:' + column_name)
self.Scrolledtext1.insert(END, '\nNew Column2:' + column_name + str(2))
self.Scrolledtext1.insert(END, '\nDelimeter:' + delimeter_name)
self.Scrolledtext1.insert(END, '\n')
self.Scrolledtext1.insert(END, 30*'#')

##Tabelle darstellen
self.frame1.grid_columnconfigure(0, weight = 1)
self.frame1.grid_rowconfigure(0, weight = 1)
Expand Down Expand Up @@ -1115,6 +1133,21 @@ def delete_rows():
df[col_del].replace(cont, np.nan, inplace=True)
df= df.dropna(subset=[col_del])




self.Scrolledtext1.insert(END, '\n')
self.Scrolledtext1.insert(END, 30*'#')
self.Scrolledtext1.insert(END, '\nDelete:')
self.Scrolledtext1.insert(END, '\nDelete where:' + delete_where)
self.Scrolledtext1.insert(END, '\nDelete Option:' + delete_option)
self.Scrolledtext1.insert(END, '\nDelete into Column:' + col_del)
self.Scrolledtext1.insert(END, '\n')
self.Scrolledtext1.insert(END, 30*'#')




##Tabelle darstellen
self.frame1.grid_columnconfigure(0, weight = 1)
self.frame1.grid_rowconfigure(0, weight = 1)
Expand Down Expand Up @@ -1154,6 +1187,18 @@ def replace_into_column():
#elif replace_option =='point to float comma':
# df[replace_where]=df[replace_where].str.replace('.',',').astype(float)

self.Scrolledtext1.insert(END, '\n')
self.Scrolledtext1.insert(END, 30*'#')
self.Scrolledtext1.insert(END, '\nReplace:')
self.Scrolledtext1.insert(END, '\nReplace where:' + replace_where)
self.Scrolledtext1.insert(END, '\nReplace Option:' + replace_option)
self.Scrolledtext1.insert(END, '\nReplace what:' + repl_what)
self.Scrolledtext1.insert(END, '\nReplace with:' + repl_with)
self.Scrolledtext1.insert(END, '\n')
self.Scrolledtext1.insert(END, 30*'#')



##Tabelle darstellen
self.frame1.grid_columnconfigure(0, weight = 1)
self.frame1.grid_rowconfigure(0, weight = 1)
Expand Down Expand Up @@ -1226,6 +1271,18 @@ def convert_date():
df[new_col_name] = pd.to_datetime(df[col_name], format='%d.%m.%Y')
df[new_col_name] = df[new_col_name].astype('datetime64[ns]')


self.Scrolledtext1.insert(END, '\n')
self.Scrolledtext1.insert(END, 30*'#')
self.Scrolledtext1.insert(END, '\nConvert Datetime Column:')
self.Scrolledtext1.insert(END, '\nCurrent String Column Name:' + col_name)
self.Scrolledtext1.insert(END, '\nCurrent Format:' + current_format)
self.Scrolledtext1.insert(END, '\nNew Column Name:' + new_col_name)
self.Scrolledtext1.insert(END, '\n')
self.Scrolledtext1.insert(END, 30*'#')



##Tabelle darstellen
self.frame1.grid_columnconfigure(0, weight = 1)
self.frame1.grid_rowconfigure(0, weight = 1)
Expand Down Expand Up @@ -1294,6 +1351,16 @@ def create_cal_info():
df[new_col_name] = df[col_name].dt.dayofweek
df[new_col_name] = df[new_col_name].astype('int')

self.Scrolledtext1.insert(END, '\n')
self.Scrolledtext1.insert(END, 30*'#')
self.Scrolledtext1.insert(END, '\nGet Datetime Information Column:')
self.Scrolledtext1.insert(END, '\nCurrent String Column Name:' + col_name)
self.Scrolledtext1.insert(END, '\nDatetime Information:' + cal_info)
self.Scrolledtext1.insert(END, '\nNew Column Name:' + new_col_name)
self.Scrolledtext1.insert(END, '\n')
self.Scrolledtext1.insert(END, 30*'#')


##Tabelle darstellen
self.frame1.grid_columnconfigure(0, weight = 1)
self.frame1.grid_rowconfigure(0, weight = 1)
Expand Down Expand Up @@ -1327,7 +1394,16 @@ def table_correlation():
df2=pd.read_csv(filename,sep=';' ,decimal=',', header=0, engine='python')
file_in_html(df2)


self.Scrolledtext1.insert(END, '\n')
self.Scrolledtext1.insert(END, 30*'#')
self.Scrolledtext1.insert(END, '\nCorrelation whoole Dataframe:')
self.Scrolledtext1.insert(END, '\nSave with file name: ' + filename + '\nInto root folder')
self.Scrolledtext1.insert(END, '\n')
self.Scrolledtext1.insert(END, 30*'#')





'''This class configures and populates the toplevel window.
top is the toplevel containing window.'''
Expand All @@ -1349,7 +1425,7 @@ def table_correlation():
top.minsize(1, 1)
top.maxsize(1351, 738)
top.resizable(1, 1)
top.title("CSVpySTAT v0.1")
top.title("CSVpySTAT v0.2")
top.configure(highlightcolor="black")

self.top = top
Expand Down Expand Up @@ -1764,12 +1840,7 @@ def table_correlation():
self.Button2.configure(command = plot_df)
self.Button2.configure(text='''Plot''')

self.Button3 = tk.Button(self.TNotebook1_t3)
self.Button3.place(relx=0.02, rely=0.85, height=33, width=153)
self.Button3.configure(borderwidth="2")
self.Button3.configure(compound='left')
self.Button3.configure(command=table_statistics)
self.Button3.configure(text='''Table Statitics''')


self.Button300 = tk.Button(self.TNotebook1_t3)
self.Button300.place(relx=0.20, rely=0.85, height=33, width=200)
Expand Down Expand Up @@ -1965,6 +2036,20 @@ def table_correlation():

##Tab6

self.Button3 = tk.Button(self.TNotebook1_t6)
self.Button3.place(relx=0.70, rely=0.15, height=33, width=200)
self.Button3.configure(borderwidth="2")
self.Button3.configure(compound='left')
self.Button3.configure(command=table_statistics)
self.Button3.configure(text='''Whoole Table Statitics''')

self.Button300 = tk.Button(self.TNotebook1_t6)
self.Button300.place(relx=0.70, rely=0.3, height=33, width=200)
self.Button300.configure(borderwidth="2")
self.Button300.configure(compound='left')
self.Button300.configure(command=table_correlation)
self.Button300.configure(text='''Whoole Table Correlation''')

self.Label61 = tk.Label(self.TNotebook1_t6)
self.Label61.place(relx=0.02, rely=0.034, height=21, width=200)
self.Label61.configure(anchor='w')
Expand Down
12 changes: 8 additions & 4 deletions Info.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
CSVpySTAT V0.1 by Ricky Helfgen
CSVpySTAT V0.2 by Ricky Helfgen


This is an open source project and is subject to the guidelines of GPL V3.

Analyze CSV-Data files with the packages:
Open, edit and analyze CSV-Data files with Python3 and the packages:

pandas, numpy, matplotlib, seaborn, statsmodels, os-sys, scipy, webbrownser, tabulate, tksheet, outlier_utils.

python3, pandas, numpy, matplotlib, seaborn, statsmodels, os-sys, scipy, webbrownser, tabulate, tksheet, outlier_utils.
The Gui is build with the 'PAGE' Project under Linux.

Thanks to all these programmers !

This is an open source project and is subject to the guidelines of GPL V3.

Download under: https://github.com/blaubaer01/CSVpySTAT

Have fun ! No War !
Binary file modified __pycache__/CSVpySTAT.cpython-39.pyc
Binary file not shown.
Binary file modified __pycache__/charts.cpython-39.pyc
Binary file not shown.
Loading

0 comments on commit 2fde259

Please sign in to comment.