1,541 views
1 1 vote

Consider the Pandas DataDrame df below. Filter it appropriately so that it outputs the shown results.

     gh owner language      repo  stars
0  pandas-dev   python    pandas  17800
1   tidyverse        R     dplyr   2800
2   tidyverse        R   ggplot2   3500
3      has2k1   python  plotnine   1450

Expected Output

     gh owner language    repo  stars
0  pandas-dev   python  pandas  17800
22% Accept Rate Accepted 2 answers out of 9 questions

1 Answer

Best answer
1 1 vote
df[(df["language"]=="python") & (df["stars"]>5000)]
selected by

Related questions

0 0 votes
0 0 answers
549
549 views
Anas asked Nov 28, 2021
549 views
So say I have a column with categorical data like different styles of temperature: 'Lukewarm', 'Hot', 'Scalding', 'Cold', 'Frostbite',... etc.I know that we can use pd.ge...
0 0 votes
1 1 answer
1.7k
1.7k views
kmr1994 asked Apr 5, 2019
1,729 views
Dataframe looks like belowI have dataframe like above. which I want to a~t reshape (a~t, 1)I want to reshape dataframe like below ( b~t column is go to under the a column...
0 0 votes
1 1 answer
605
605 views
0 0 votes
1 1 answer
596
596 views
tofighi asked Oct 18, 2018
596 views
1 1 vote
1 1 answer
1.6k
1.6k views
Hagar asked Jun 24, 2023
1,600 views
Hello,I have a dataset with a categorical column that contains three categories. One of the categories represents 98% of the data, while the remaining 2% are distributed ...