-1

I have 2 data frame

the first :

id event_type

1 event_type1

2 event_type1

3 event_type2

etc ..

the second have a type dtype('O')

I don't know what it is but i don't have column's name for this

event_type 11 25.3064

event_type 35 21.2223

event_type 34 02.90151

and I want to regroup event_type if percent<5 and after put this in my main principal,

thank you,

Naïma !!

1 Answers1

0

Joining two dataframes on a common column can be done as described in the following answer.

For the filtering you can use something along these lines:

resulting_df = df[df.percent_column < 5.0]

where percent_column is the name of the column from the df that contains the percent value you want to filter on.

sophros
  • 8,714
  • 5
  • 30
  • 57