0

Pardon this noob question:

  1. Why do I have Indexing 0 - 4 by the side? Is there someway that I can remove?
  2. Also, I am not sure how can I remove the display of the type even though I don't think I have specified it in my code below?

I am using Python Pandas and the following is what I have coded. Thanks! :)

# By Flat Price
min_flat_price = float(input ("Enter a minimum flat price: "))
max_flat_price = float(input ("Enter a maximum flat price: "))
dummy_df = dummy_df[(dummy_df['resale_price'] >= min_flat_price) & (dummy_df['resale_price'] <= max_flat_price)]
dummy_df = dummy_df['flat_type']
flat_types_available = dummy_df.drop_duplicates()
flat_types_available = flat_types_available.reset_index(drop=True)
print(flat_types_available)

enter image description here

Beso
  • 1,176
  • 5
  • 12
  • 26
suzanne chen
  • 135
  • 1
  • 7
  • 2
    What did the index ever do to you that you want it gone so badly? Anyway you can use `print(df.to_string(index=False))` – cs95 Dec 17 '20 at 15:13
  • Lol thank you! Just had to follow the exact output indicated in the school document! – suzanne chen Dec 17 '20 at 15:32

0 Answers0