Update app.py
Browse files
app.py
CHANGED
|
@@ -4,14 +4,21 @@ url = "https://huggingface.co/buckets/Neon-tech/Dataset-arranger/resolve/image-s
|
|
| 4 |
|
| 5 |
df = pd.read_parquet(url)
|
| 6 |
|
| 7 |
-
# 1. Columns
|
| 8 |
print("COLUMNS:")
|
| 9 |
print(df.columns.tolist())
|
| 10 |
|
| 11 |
-
# 2. Shape (rows, columns)
|
| 12 |
print("\nSHAPE:")
|
| 13 |
print(df.shape)
|
| 14 |
|
| 15 |
-
#
|
| 16 |
-
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
df = pd.read_parquet(url)
|
| 6 |
|
|
|
|
| 7 |
print("COLUMNS:")
|
| 8 |
print(df.columns.tolist())
|
| 9 |
|
|
|
|
| 10 |
print("\nSHAPE:")
|
| 11 |
print(df.shape)
|
| 12 |
|
| 13 |
+
# copy dataframe for safe display
|
| 14 |
+
preview = df.head(10).copy()
|
| 15 |
+
|
| 16 |
+
# convert bytes / binary columns to readable placeholders
|
| 17 |
+
for col in preview.columns:
|
| 18 |
+
if preview[col].dtype == "object":
|
| 19 |
+
preview[col] = preview[col].apply(
|
| 20 |
+
lambda x: "<BYTES>" if isinstance(x, (bytes, bytearray)) else x
|
| 21 |
+
)
|
| 22 |
+
|
| 23 |
+
print("\nFIRST 10 ROWS (cleaned):")
|
| 24 |
+
print(preview.to_string(index=False))
|