Creating a DataFrame from a List of Dictionaries
data = [
{'name': 'Laptop', 'price': 999.99, 'rating': 4.5},
{'name': 'Smartphone', 'price': 499.99, 'rating': 4.7},
{'name': 'Tablet', 'price': 299.99, 'rating': 4.2},
]
df = pd.DataFrame(data)
print(df)