MulSeries.query#
- MulSeries.query(index=None, **kwargs)#
Query the index dataframe of a MulSeries and return the the query result as a MulSeries.
The function uses the
pandas.DataFrame.querymethod under the hood.Parameters#
- indexNone or str
The query string to evaluate for the index dataframe. Check DataFrame.query for detailed specification of this argument.
- kwargsany
The same
kwargspassed to DataFrame.query including theinplace=Falseargument.
Returns#
- MulSeries or None
None if
inplace=True.
Examples#
>>> index = pd.DataFrame([['a','b','c'], ['g','b','f'], ['b','g','h']], columns=['x','y','z']) >>> name = pd.Series(['a','b'],index=['e','f'],name='cc') >>> ms = MulSeries([1,2,3],index=index,name=name) >>> ms.query('y == "b"') (2,) f b e a cc ---------- ------ x y z cc 0 a b c 0 1 1 g b f 1 2
MulDataFrame