I am new in Python. I would like to know how should I extract the first three value of a column in Python. I used CSV file. Here is my code:
import pandas as pd
you want either
# get first three census_df['COUNTY'].head(3)
or
# get largest three census_df['COUNTY'].nlargest(3)
if you want the records with the 3 largest COUNTY values
COUNTY
census_df.iloc[census_df['COUNTY'].argsort()[-3:]]