Screen Link:
My Code:
large_revenue = f500["revenues"] > 100
negative_profits = f500["profits"] < 0
combined = large_revenue & negative_profits
big_rev_neg_profit = f500[combined, ["revenues", "profits"]]
What I expected to happen:
This one is taken from the Exploring Data with Pandas: Fundamentals (Part 8). As far as I understand, when we refer to the dataframe we have to use this format [row_name, column_name], however here we are using Boolean Indexing instead of providing the rows. Can you, please, tell me how Boolean indexing works in this situation and why do we put Boolean indexes instead of rows? This issue is also applicable to Numpy too.
Thank you in advance
What actually happened:
Replace this line with the output/error