app.py
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import pandas as pd import numpy as np rows = 100 df = pd.DataFrame({ "Name": [f"User{i}" for i in range(1, rows+1)], "Age": np.random.randint(18, 60, size=rows), "Country": np.random.choice(["USA", "India", "UK", "Canada", "Germany"], size=rows), "Marks": np.round(np.random.uniform(40, 100, size=rows), 2) }) df.to_csv("numpy_data.csv", index=False) df.to_excel("numpy_data.xlsx", index=False) df.to_json("numpy_data.json", orient="records", indent=4) |