Indexing and selecting data — pandas 1.3.5 documentation
pandas.pydata.org › pandas-docs › stableDataFrame (np. random. randn (n, 2), index = index) In [238]: df Out[238]: 0 1 color food red ham 0.194889 -0.381994 ham 0.318587 2.089075 eggs -0.728293 -0.090255 green eggs -0.748199 1.318931 eggs -2.029766 0.792652 ham 0.461007 -0.542749 ham -0.305384 -0.479195 eggs 0.095031 -0.270099 eggs -0.707140 -0.773882 eggs 0.229453 0.304418 In [239]: df. query ('color == "red"') Out[239]: 0 1 color food red ham 0.194889 -0.381994 ham 0.318587 2.089075 eggs -0.728293 -0.090255
pandas.Index.values — pandas 1.3.5 documentation
pandas.pydata.org › api › pandasDataFrame pandas arrays Index objects pandas.Index pandas.Index.values pandas.Index.is_monotonic pandas.Index.is_monotonic_increasing pandas.Index.is_monotonic_decreasing pandas.Index.is_unique pandas.Index.has_duplicates pandas.Index.hasnans pandas.Index.dtype pandas.Index.inferred_type pandas.Index.is_all_dates pandas.Index.shape