python - Drop row in dataframe based on condition in column -
i have dataframe looks follows
class number 2015 0 0 0 ret real estate 1 0 ret empty 2 0 ret equity 3 0 ret participations 4 0 ret empty 5 0 ret private equity 6 0 ret hedge fund 7 0 ret high yield 8 0 ret loan, multitranchen, fsb, fss_fsb 9 0 ret empty 10 0 ret loan gr, fsb 11 0 ret empty 12 0 ret corporate bonds 13 0
i delete rows value in column "class" "empty". following code returns dataframe na values.
df[df[["class"]] != "empty"]
can me out that?
Comments
Post a Comment