Aug-24-2018, 11:15 AM
Got it, my mistake was not assigning it to a variable as so:
df=df.drop(df.query('salary == 0').sample(frac=.41).index)
Removing rows at random based on the value of a specific column
|
|
Messages In This Thread |
Removing rows at random based on the value of a specific column - by Mr_Keystrokes - Aug-23-2018, 02:51 PM
RE: Removing rows at random based on the value of a specific column - by ichabod801 - Aug-23-2018, 02:58 PM
RE: Removing rows at random based on the value of a specific column - by Mr_Keystrokes - Aug-23-2018, 03:13 PM
RE: Removing rows at random based on the value of a specific column - by ichabod801 - Aug-23-2018, 05:16 PM
RE: Removing rows at random based on the value of a specific column - by Mr_Keystrokes - Aug-24-2018, 11:15 AM
|