import eda_reveal

# Sample dataset
data = [
    {"name": "A", "age": "20", "salary": "30000"},
    {"name": "B", "age": "22", "salary": "40000"},
    {"name": "C", "age": "24", "salary": "50000"},
    {"name": "D", "age": "",  "salary": "40000"},
]

print("========= BASIC INFO =========")
print("Row Count:", eda_reveal.count_rows(data))
print("Column Count:", eda_reveal.count_columns(data))
print("Columns:", eda_reveal.list_columns(data))

print("\n========= MEAN EXPLANATION =========")
print(eda_reveal.mean(data, "age", explain=True))

print("\n========= MEDIAN EXPLANATION =========")
print(eda_reveal.median(data, "age", explain=True))

print("\n========= VARIANCE EXPLANATION =========")
print(eda_reveal.variance(data, "age", explain=True))

print("\n========= VALUE COUNTS =========")
print(eda_reveal.value_counts(data, "salary"))

print("\n========= FILTER EXPLANATION =========")
print(eda_reveal.filter_rows(data, "age", ">", 21, explain=True))

print("\n========= MISSING VALUES =========")
print(eda_reveal.find_missing(data))

print("\n========= SORTED DATA =========")
print(eda_reveal.sort_data(data, "age"))

print("\n✅ Demo Completed Successfully!")