0

I have a dataframe like this:

         day  temp condition
0     Monday    12     Sunny
1    Tuesday    14      Rain
2  Wednesday    15      Rain
3   Thursday    14    Cloudy
4     Friday    21     Sunny
5   Saturday    22     Sunny
6     Sunday    24     Sunny

How do I print the row with day as Monday?

ThePyGuy
  • 13,387
  • 4
  • 15
  • 42
heysujal
  • 98
  • 6
  • Welcome to the community. Please take a little time to do research before asking. Refer to this question: https://stackoverflow.com/questions/17071871/how-to-select-rows-from-a-dataframe-based-on-column-values – GusSL May 13 '21 at 21:22
  • 1
    @GusSL okay, I will keep this in mind , from now on. – heysujal May 13 '21 at 21:24

1 Answers1

0
import pandas
data = pandas.read_csv("weather_data.csv")
print(data[data.day == "Monday"])
heysujal
  • 98
  • 6
  • Thanks for your input to StackOverflow. Please add some more detail to your answer, such as explanatory text and what the OP had done wrong originally. This will help the OP and any future readers. Thank you. – PeterS May 13 '21 at 22:20
  • This is the exact code in the linked duplicate. No need to repeat it here... – Tomerikoo May 14 '21 at 10:56