import pandas as pd data = {'Name': ['John', 'Mary', 'Paul'], 'Age': [25, 30, 35], 'Country': ['USA', 'Canada', 'UK']} df = pd.DataFrame(data) print(df)
import pandas as pd df = pd.read_csv('data.csv') print(df.head())This code reads data from a CSV file named 'data.csv' and creates a DataFrame. The `head()` method displays the first five rows of the DataFrame. Package library: pandas.