python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
Counting and grouping data that have the same value in several columns
I have a hard time doing this particular task: from the data below I want to count the elements that are equal to 0 in all Degrees and group them. In other words, how many X1 have all of the three deg...
Yves Laurent
Votes: 0
Answers: 2
Apply function 'str' object has no attribute 'str'
cause I don't really understand why it works in one format and doesn't work in another.
Works:
df['team'] = df['team'].str.extract(r'(\w+)+')
Doesn't work:
def clear_teams(gr):
return gr.str.extr...

KosaKing
Votes: 0
Answers: 1
How can I avoid dropping rows with NaNs when using Pandas `where` method?
I'm running into a problem when using the Pandas where method. Specifically, I'm using the where to identify rows in a dataframe that meet specific conditions. If these conditions are met, the where...
jgg
Votes: 0
Answers: 1
Str attribute error when using .apply() on a pandas series
I have a df as follows:
data = {'Internal': ['unpaid second interator 4,000 USD and $50 third', '35 $ unpaid', "all good"],
'Name': ['Charlie', 'Rodolf', 'samuel']}
df = pd.DataFra...

Clay Campbell
Votes: 0
Answers: 1