
import pandas as pd
import numpy as np
data = {
'name': {'철수','영희','동희','영수'},
'age': [15,20,32,40]
}
df = pd.DataFrame(data)
df
리고 입력을 했습니다. 근데 결과가 이렇게 나옵니다. !!!
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-18-ed96ee15e90c> in <module>
3 'age': [15,20,32,40]
4 }
----> 5 df = pd.DataFrame(data)
4 frames
/usr/local/lib/python3.7/dist-packages/pandas/core/construction.py in sanitize_array(data, index, dtype, copy, raise_cast_failure, allow_2d)
557 if isinstance(data, (set, frozenset)):
558 # Raise only for unordered sets, e.g., not for dict_keys
--> 559 raise TypeError(f"'{type(data).__name__}' type is unordered")
560
561 # materialize e.g. generators, convert e.g. tuples, abc.ValueView
TypeError: 'set' type is unordered
