简体   繁体   中英

transform a dataframe with frozenset values to plain dataframe

I have a dataframe like this:

    antecedents    consequents          support    confidence      lift
0   (weather1)   (go for swimming)     0.965517      1.0          1.035714
1   (weather2)   (stay home)          0.965517       1.0          1.035714

The dataframe has frozenset values. For example:

df['antecedents'][0]

frozenset({weather1})

How to transform this dataframe to a plain dataframe (ie without frozenset values)?

I tried to transform to a list and back to a dataframe but this is not working

Any ideas?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM