Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/349.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Dataframe.xs()中的几个标准_Python_Pandas - Fatal编程技术网

Python Dataframe.xs()中的几个标准

Python Dataframe.xs()中的几个标准,python,pandas,Python,Pandas,假设我有一个包含两个整数的多重索引,我想选择 where (level=0 in [0,1]) and (level=1 in [0,1]) (也就是说,我想要[[0,0],[0,1],[1,0],[1,1]) 我该怎么做 .xs([0,1],level=[0,1])给了我当level=0在[0]中,level=1在[1]中时,,我尝试的任何其他有意义的东西都会导致键错误。你可以在0.14.0中这样做(即将发布),请参阅 rc1是

假设我有一个包含两个整数的多重索引,我想选择

where (level=0 in [0,1]) and (level=1 in [0,1])
(也就是说,我想要
[[0,0],[0,1],[1,0],[1,1]

我该怎么做

.xs([0,1],level=[0,1])
给了我
当level=0在[0]中,level=1在[1]中时,
,我尝试的任何其他有意义的东西都会导致键错误。

你可以在0.14.0中这样做(即将发布),请参阅

rc1是