Spaces:
Sleeping
Sleeping
File size: 1,044 Bytes
b4a2e7f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | import pandas as pd
import os
norms_path = "/run/media/ishpreet/New Volume/Auribises/Vardhman Textiles/AT1 MKT PD Gr Norms Rev on 13-12-2025.xlsx"
data_path = "/run/media/ishpreet/New Volume/Auribises/Vardhman Textiles/Final Base Data for PD Gr issue Norsm 15-01-26.xlsx"
def inspect_file(path, name):
print(f"--- Inspecting {name} ---")
try:
xl = pd.ExcelFile(path)
print(f"Sheets: {xl.sheet_names}")
for sheet in xl.sheet_names:
print(f"\nSheet: {sheet}")
df = xl.parse(sheet, nrows=5)
print(f"Columns: {list(df.columns)}")
print(df.head())
print("-" * 30)
except Exception as e:
print(f"Error inspecting {name}: {e}")
if __name__ == "__main__":
if os.path.exists(norms_path):
inspect_file(norms_path, "Norms File")
else:
print(f"File not found: {norms_path}")
if os.path.exists(data_path):
inspect_file(data_path, "Base Data File")
else:
print(f"File not found: {data_path}")
|