sami
sami

Reputation: 551

How can i make pandas version 18.0 store sets

How can I make pandas version 18.0 store sets

I'm working with python pandas I use the code below and i get different result on pandas version 18.0 and pandas version 17.0

import pandas as pd
data = pd.DataFrame([{'a':set()}])

    a
0  {}

while in 17.0 the result is

         a
0  set([])

Upvotes: 1

Views: 63

Answers (1)

chrisb
chrisb

Reputation: 52276

The data is stored the same - just the print repr seems to be different.

In [83]: import pandas as pd
    ...: data = pd.DataFrame([{'a':set()}])

In [84]: data
Out[84]: 
    a
0  {}

In [85]: data.iloc[0,0]
Out[85]: set()

Upvotes: 2

Related Questions