figure - price trend over time for given user this time our visualization clearly helps us see the purchase pattern for this user though we can discuss about insights from this visualization at lengtha quick inference is clearly visible as the plot showsthe user seems to have purchased high valued items in the starting of the yearwith decreasing trend as the year has progressed alsothe number of transactions in the beginning of the year are more and closer as compared to rest of the year we can correlate such details with more data to identify patterns and behaviors we shall cover more such aspects in coming bar plots having seen trends for particular userlet' take look at our dataset at an aggregated level since we already have derived attribute called the purchase_weeklet' use it to aggregate quantities purchased by users over time we first aggregate the data at week level using the groupby(function and then aggregate the attribute quantity_purchased the final step is to plot the aggregation on bar plot the following snippet helps us plot this information df[['purchase_week''quantity_purchased']groupby('purchase_week'sum(plot barhcolor='orange'plt title('quantities purchased per week'we use the barh(function to prepare horizontal bar chart it is similar to standard bar(plot in terms of the way it represents information the difference is in the orientation of the plots figure - shows the generated output