Filter the orders data frame to only include rows where the PromoID is 30_OFF:
Filter the orders data frame to only include rows where the PromoID is 30_OFF and the ProductID is 228722:
Filter the orders data frame to only include rows where the PromoID is 30_OFF or the ProductID is 228722:
Here we have the same filter as the basic filter but using the loc operation. Just like when using loc for selecting columns and rows it creates a unique dataframe rather than a view like with the basic filter.
Sort the orders dataframe by ProductID and then Order_Date in descending order.
Sample 100 rows from the orders dataframe
Sample 10% of rows from the orders dataframe