read_orders
#
Functions and classes for reading in order information from the excel sheet containing responses from the Microsoft form
Classes:
-
Order–Class to hold information about a single specific order
Functions:
-
extract_orders–Read in the order response form as a pandas DataFrame.
-
read_order–Obtain the order information for a specific person
Order
#
Order(
email: str,
name: str,
items: List[str],
sizings: List[str],
back_names: List[str],
sleeve_names: List[str],
)
Class to hold information about a single specific order
Parameters#
email : str Email address of person placing the order name : str Name of the person placing the order items : list Ordered items sizings : list Sizing information (XS, S, .., 4XL) back_names : list Personalisations to be printed on the back of the item sleeve_names : list Initials to be printed on the sleeve
Returns#
None
Methods:
-
identify_products–Assign a product name to each item in the order
-
update_pricing–Calculate the total price of a single person's
Source code in plkit/read_orders.py
identify_products
#
Assign a product name to each item in the order
Source code in plkit/read_orders.py
update_pricing
#
Calculate the total price of a single person's order
Source code in plkit/read_orders.py
extract_orders
#
Read in the order response form as a pandas DataFrame.
Parameters#
filename : str, optional The name of the responses form saved from Microsoft forms
Returns#
df_orders : pd.DataFrame The order details converted to a pandas DataFrame
Source code in plkit/read_orders.py
read_order
#
Obtain the order information for a specific person
Parameters#
df_orders: pd.DataFrame The pandas DataFrame containing all the order information name : str The name of the person placing the order email : str, optional The email address of the person placing the order
Returns#
order : class Instance of the Order class for the specified name