7
import pandas as pd
donor_df=pd.read_csv('Election_Donor_Data.csv')
top_donor=donor_df['contb_receipt_amt'].copy()
top_donor.sort()
top_donor

sort method is not getting applied on top_donor giving an error.why?

Ben.hardy
  • 125
  • 1
  • 2
  • 8
  • 8
    The method is `sort_values` now. You also need to assign it back: `top_donor = top_donor.sort_values()`. – ayhan Jul 05 '18 at 20:58

0 Answers0