Neon-tech commited on
Commit
5b2c3aa
·
verified ·
1 Parent(s): 76d69ad

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -5
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
- # 3. First 10 rows (full view)
16
- print("\nFIRST 10 ROWS:")
17
- print(df.head(10).to_string(index=False))
 
 
 
 
 
 
 
 
 
 
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))