의해 정의 dataframe하는 그때 제가할당 값 multiindex
slice = results.loc['factor2'].copy()
을 수행하고 (함수에서 수행) 슬라이스에 계산 된 값을 기입
factor_list = ['factor1', 'factor2', 'factor3']
method_list = ['method1', 'method2', 'method3']
grouping_list = ['group1', 'group2', 'group3']
parameter_list = [1, 5, 10, 20, 40]
iterables = [factor_list, method_list, parameter_list, grouping_list]
axis_names = ['factor', 'method', 'param', 'grouping']
multi_index = pd.MultiIndex.from_product(iterables, names=axis_names)
column_list = ['a', 'b', 'c', 'd', 'e']
results = pd.DataFrame(index=multi_index, columns=column_list)
results.sort_index(inplace=True)
의해 만들어진 5 차원 DF있다.
cannot align on a multi-index with out specifying the join levels
정확한 질문은 다음과 같습니다 :
어떻게 다시 조각의 콘텐츠를 복사 할
그럼 내가 다음 줄은 오류를 발생시킵니다 다시
results.loc['factor2'] = slice
결과를 복사 할 수 없습니다 것을 발견 factor2
일부 결과 DataFrame
? 나를 위해
몇 가지 예제를 게시에 대해 마스크 할 수 있습니까? – WoodChopper