import pandas as pd
filename = “record.csv”
data = pd.read_csv(filename)
print(data.head()) # Print the head of the DataFrame
data_array = data.values # Convert the dataframe to a number array
print(type(data_array)) # Print the datatype of data_array
import matplotlib.pyplot as plt
file = 'record.csv'
data = pd.read_csv(file, sep="\t", comment="#", na_values="Nothing") # sep: for tab-delimited, comment takes characters that comments occur after in the file, na_values takes a list of strings to recognize as NA/NaN
print(data.head()) # Print the head of the DataFrame
pd.DataFrame.hist(data[['Age']]) # Plot 'Age' variable in a histogram
plt.xlabel('Age (years)')
plt.ylabel('count')
plt.show()