Course Name: Python for Trading: Basic, Section No: 8, Unit No: 12, Unit type: Notebook
Can someone explain the output of the following statement: print(infy.mode())
Course Name: Python for Trading: Basic, Section No: 8, Unit No: 12, Unit type: Notebook
Can someone explain the output of the following statement: print(infy.mode())
Hi Dipanshu
This statement:“print(infy.mode())” - will print the mode of the closing prices.
Mode implies the most frequently occurring value. Sometimes in a data set we can have multiple values which occur with the same highest frequency.
So, here in the above example- All the 17 mode value in solution are occurring 2 times. You can also check by running the below code for better clarity.
infy[‘Close Price’].value_counts()[mode_price]