Spaces:
Sleeping
Sleeping
Mustehson
commited on
Commit
·
43c14a6
1
Parent(s):
ff2f4d3
Rmv Bug in Describe
Browse files
app.py
CHANGED
@@ -127,11 +127,15 @@ def get_table_schema(table):
|
|
127 |
return full_path
|
128 |
|
129 |
def describe(df):
|
130 |
-
numerical_info = df.select_dtypes(include=['number']).describe().T.reset_index()
|
131 |
-
numerical_info.rename(columns={'index': 'column'}, inplace=True)
|
132 |
|
133 |
-
|
134 |
-
categorical_info.
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
|
136 |
return numerical_info, categorical_info
|
137 |
|
|
|
127 |
return full_path
|
128 |
|
129 |
def describe(df):
|
|
|
|
|
130 |
|
131 |
+
numerical_info = pd.DataFrame()
|
132 |
+
categorical_info = pd.DataFrame()
|
133 |
+
if len(df.select_dtypes(include=['number']).columns) >= 1:
|
134 |
+
numerical_info = df.select_dtypes(include=['number']).describe().T.reset_index()
|
135 |
+
numerical_info.rename(columns={'index': 'column'}, inplace=True)
|
136 |
+
if len(df.select_dtypes(include=['object']).columns) >= 1:
|
137 |
+
categorical_info = df.select_dtypes(include=['object']).describe().T.reset_index()
|
138 |
+
categorical_info.rename(columns={'index': 'column'}, inplace=True)
|
139 |
|
140 |
return numerical_info, categorical_info
|
141 |
|