For analyzing the data, we need a lot of filtering operations. Pandas provide a query() method to filter the DataFrame.
It offers a simple way of making the selection and also capable of simplifying the task of index-based selection.
It returns a DataFrame that results from the query expression.
Note: This method only works if the column name doesn't have any empty spaces. You can replace the spaces in column names with '_'
X Y Z Z 0 1 10 10