Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1225,12 +1225,17 @@ def handle_large_dataset(df, create_document,isDataFrame):
|
|
1225 |
if len(df.columns) > 1:
|
1226 |
# Skipping the original first column
|
1227 |
# List of required columns
|
|
|
1228 |
required_columns = ['BROKER', 'ACCOUNT NUMBER', 'EMPLOYEE NAME', 'ACCOUNT NAME', 'ACCOUNT ID']
|
1229 |
# Filter the DataFrame to include only the required columns
|
1230 |
#print(df[required_columns])
|
1231 |
#limited_data = df[required_columns]
|
1232 |
-
|
1233 |
-
|
|
|
|
|
|
|
|
|
1234 |
limited_data_without_first_column = limited_data.iloc[:, 1:]
|
1235 |
else:
|
1236 |
limited_data = df.head(20)
|
|
|
1225 |
if len(df.columns) > 1:
|
1226 |
# Skipping the original first column
|
1227 |
# List of required columns
|
1228 |
+
|
1229 |
required_columns = ['BROKER', 'ACCOUNT NUMBER', 'EMPLOYEE NAME', 'ACCOUNT NAME', 'ACCOUNT ID']
|
1230 |
# Filter the DataFrame to include only the required columns
|
1231 |
#print(df[required_columns])
|
1232 |
#limited_data = df[required_columns]
|
1233 |
+
limited_data_top3 = df.head(3)
|
1234 |
+
if len(df.columns) > 5:
|
1235 |
+
limited_data = limited_data_top3[required_columns]
|
1236 |
+
else:
|
1237 |
+
limited_data = limited_data_top3
|
1238 |
+
|
1239 |
limited_data_without_first_column = limited_data.iloc[:, 1:]
|
1240 |
else:
|
1241 |
limited_data = df.head(20)
|