Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import pandas as pd
|
| 2 |
+
|
| 3 |
+
url = "https://huggingface.co/buckets/Neon-tech/Dataset-arranger/resolve/image-shards/shard_000018.parquet?download=true"
|
| 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))
|