Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -410,6 +410,26 @@ def analyze_z_test(file):
|
|
410 |
|
411 |
return result_dataframes
|
412 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
413 |
|
414 |
def all_tabulation(df, main_dict, follow_dict):
|
415 |
|
|
|
410 |
|
411 |
return result_dataframes
|
412 |
|
413 |
+
def join_dataframes(mlist ,dataframes):
|
414 |
+
max_rows = max(df.shape[0] for df in dataframes)
|
415 |
+
result = pd.DataFrame()
|
416 |
+
i = 1
|
417 |
+
for df in dataframes:
|
418 |
+
rows_to_add = max_rows - df.shape[0]
|
419 |
+
if rows_to_add > 0:
|
420 |
+
# Create a DataFrame with empty rows
|
421 |
+
empty_rows = pd.DataFrame(index=range(rows_to_add), columns=df.columns)
|
422 |
+
#Fill empty rows with np.nan
|
423 |
+
empty_rows = empty_rows.fillna(np.nan)
|
424 |
+
|
425 |
+
df = pd.concat([df, empty_rows], ignore_index=True)
|
426 |
+
if not result.empty:
|
427 |
+
result = pd.concat([result, pd.DataFrame(columns=[mlist[i]])], axis=1)
|
428 |
+
i += 1
|
429 |
+
|
430 |
+
result = pd.concat([result, df.reset_index(drop=True)], axis=1)
|
431 |
+
|
432 |
+
return result
|
433 |
|
434 |
def all_tabulation(df, main_dict, follow_dict):
|
435 |
|