0
concat()에서 반환 한 DataFrame을 이전하는 방법은 무엇입니까?Pandas transpose concat()
df = DataFrame([
dict(a=1, b=10, c=41),
dict(a=1, b=20, c=42),
])
concat([df, df]).T
내가 얻을 :
AttributeError: 'DataFrame' object has no attribute 'dtypes' !
내가하려고하면 :
concat([df, df]).T.to_dict()
내가 얻을 :
RuntimeError: maximum recursion depth exceeded in cmp
나는이는 CONCAT에 의해 도입 된 중복에 관한 생각 ()를 사용했지만 해결 방법을 찾지 못했습니다.
당신이 달성하려고하는 것을 설명 할 수 있습니까? – root
df.T.to_dict()로 DataFrame 값을 unittest하는 데 사용했습니다. values () – PhE
fyi 최신 팬더 릴리스가 인덱스 중복을 지원할 수 있다고 생각합니다. 0.8.0 전에는 그렇지 않습니다. –