formatted_text
stringclasses
135 values
<|user|> Exercise 1:Read Total profit of all months and show it using a line plot<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\\Python\\Articles\\matplotlib\\sales_data.csv") profitList = df ['total_profit'].tolist() monthList = df ['month_number'].tolist() plt.plot(monthList, profitList, label = 'Month-wise Profit data of last year') plt.xlabel('Month number') plt.ylabel('Profit in dollar') plt.xticks(monthList) plt.title('Company profit per month') plt.yticks([100000, 200000, 300000, 400000, 500000]) plt.show() ```<|end|>
<|user|> Exercise 2: Get total profit of all months and show line plot with the following Style properties<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\\Python\\Articles\\matplotlib\\sales_data.csv") profitList = df ['total_profit'].tolist() monthList = df ['month_number'].tolist() plt.plot(monthList, profitList, label = 'Profit data of last year', color='r', marker='o', markerfacecolor='k', linestyle='--', linewidth=3) plt.xlabel('Month Number') plt.ylabel('Profit in dollar') plt.legend(loc='lower right') plt.title('Company Sales data of last year') plt.xticks(monthList) plt.yticks([100000, 200000, 300000, 400000, 500000]) plt.show() ```<|end|>
<|user|> Exercise 3: Read all product sales data and show it  using a multiline plot<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\\Python\\Articles\\matplotlib\\sales_data.csv") monthList = df ['month_number'].tolist() faceCremSalesData = df ['facecream'].tolist() faceWashSalesData = df ['facewash'].tolist() toothPasteSalesData = df ['toothpaste'].tolist() bathingsoapSalesData = df ['bathingsoap'].tolist() shampooSalesData = df ['shampoo'].tolist() moisturizerSalesData = df ['moisturizer'].tolist() plt.plot(monthList, faceCremSalesData, label = 'Face cream Sales Data', marker='o', linewidth=3) plt.plot(monthList, faceWashSalesData, label = 'Face Wash Sales Data', marker='o', linewidth=3) plt.plot(monthList, toothPasteSalesData, label = 'ToothPaste Sales Data', marker='o', linewidth=3) plt.plot(monthList, bathingsoapSalesData, label = 'ToothPaste Sales Data', marker='o', linewidth=3) plt.plot(monthList, shampooSalesData, label = 'ToothPaste Sales Data', marker='o', linewidth=3) plt.plot(monthList, moisturizerSalesData, label = 'ToothPaste Sales Data', marker='o', linewidth=3) plt.xlabel('Month Number') plt.ylabel('Sales units in number') plt.legend(loc='upper left') plt.xticks(monthList) plt.yticks([1000, 2000, 4000, 6000, 8000, 10000, 12000, 15000, 18000]) plt.title('Sales data') plt.show() ```<|end|>
<|user|> Exercise 4: Read toothpaste sales data of each month and show it using a scatter plot<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\\Python\\Articles\\matplotlib\\sales_data.csv") monthList = df ['month_number'].tolist() toothPasteSalesData = df ['toothpaste'].tolist() plt.scatter(monthList, toothPasteSalesData, label = 'Tooth paste Sales data') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title(' Tooth paste Sales data') plt.xticks(monthList) plt.grid(True, linewidth= 1, linestyle="--") plt.show() ```<|end|>
<|user|> Exercise 5: Read face cream and facewash product sales data and show it using the bar chart<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\\Python\\Articles\\matplotlib\\sales_data.csv") monthList = df ['month_number'].tolist() faceCremSalesData = df ['facecream'].tolist() faceWashSalesData = df ['facewash'].tolist() plt.bar([a-0.25 for a in monthList], faceCremSalesData, width= 0.25, label = 'Face Cream sales data', align='edge') plt.bar([a+0.25 for a in monthList], faceWashSalesData, width= -0.25, label = 'Face Wash sales data', align='edge') plt.xlabel('Month Number') plt.ylabel('Sales units in number') plt.legend(loc='upper left') plt.title(' Sales data') plt.xticks(monthList) plt.grid(True, linewidth= 1, linestyle="--") plt.title('Facewash and facecream sales data') plt.show() ```<|end|>
<|user|> Exercise 6: Read sales data of bathing soap of all months and show it using a bar chart. Save this plot to your hard disk<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\\Python\\Articles\\matplotlib\\sales_data.csv") monthList = df ['month_number'].tolist() bathingsoapSalesData = df ['bathingsoap'].tolist() plt.bar(monthList, bathingsoapSalesData) plt.xlabel('Month Number') plt.ylabel('Sales units in number') plt.title(' Sales data') plt.xticks(monthList) plt.grid(True, linewidth= 1, linestyle="--") plt.title('bathingsoap sales data') plt.savefig('D:\Python\Articles\matplotlib\sales_data_of_bathingsoap.png', dpi=150) plt.show() ```<|end|>
<|user|> Exercise 7: Read the total profit of each month and show it using the histogram to see the most common profit ranges<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\\Python\\Articles\\matplotlib\\sales_data.csv") profitList = df ['total_profit'].tolist() labels = ['low', 'average', 'Good', 'Best'] profit_range = [150000, 175000, 200000, 225000, 250000, 300000, 350000] plt.hist(profitList, profit_range, label = 'Profit data') plt.xlabel('profit range in dollar') plt.ylabel('Actual Profit in dollar') plt.legend(loc='upper left') plt.xticks(profit_range) plt.title('Profit data') plt.show() ```<|end|>
<|user|> Exercise 8: Calculate total sale data for last year for each product and show it using a Pie chart<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\\Python\\Articles\\matplotlib\\sales_data.csv") monthList = df ['month_number'].tolist() labels = ['FaceCream', 'FaseWash', 'ToothPaste', 'Bathing soap', 'Shampoo', 'Moisturizer'] salesData = [df ['facecream'].sum(), df ['facewash'].sum(), df ['toothpaste'].sum(), df ['bathingsoap'].sum(), df ['shampoo'].sum(), df ['moisturizer'].sum()] plt.axis("equal") plt.pie(salesData, labels=labels, autopct='%1.1f%%') plt.legend(loc='lower right') plt.title('Sales data') plt.show() ```<|end|>
<|user|> Exercise 9: Read Bathing soap facewash of all months and display it using the Subplot<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\\Python\\Articles\\matplotlib\\sales_data.csv") monthList = df ['month_number'].tolist() bathingsoap = df ['bathingsoap'].tolist() faceWashSalesData = df ['facewash'].tolist() f, axarr = plt.subplots(2, sharex=True) axarr[0].plot(monthList, bathingsoap, label = 'Bathingsoap Sales Data', color='k', marker='o', linewidth=3) axarr[0].set_title('Sales data of a Bathingsoap') axarr[1].plot(monthList, faceWashSalesData, label = 'Face Wash Sales Data', color='r', marker='o', linewidth=3) axarr[1].set_title('Sales data of a facewash') plt.xticks(monthList) plt.xlabel('Month Number') plt.ylabel('Sales units in number') plt.show() ```<|end|>
<|user|> Exercise Question 10: Read all product sales data and show it using the stack plot<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\\Python\\Articles\\matplotlib\\sales_data.csv") monthList = df ['month_number'].tolist() faceCremSalesData = df ['facecream'].tolist() faceWashSalesData = df ['facewash'].tolist() toothPasteSalesData = df ['toothpaste'].tolist() bathingsoapSalesData = df ['bathingsoap'].tolist() shampooSalesData = df ['shampoo'].tolist() moisturizerSalesData = df ['moisturizer'].tolist() plt.plot([],[],color='m', label='face Cream', linewidth=5) plt.plot([],[],color='c', label='Face wash', linewidth=5) plt.plot([],[],color='r', label='Tooth paste', linewidth=5) plt.plot([],[],color='k', label='Bathing soap', linewidth=5) plt.plot([],[],color='g', label='Shampoo', linewidth=5) plt.plot([],[],color='y', label='Moisturizer', linewidth=5) plt.stackplot(monthList, faceCremSalesData, faceWashSalesData, toothPasteSalesData, bathingsoapSalesData, shampooSalesData, moisturizerSalesData, colors=['m','c','r','k','g','y']) plt.xlabel('Month Number') plt.ylabel('Sales unints in Number') plt.title('Alll product sales data using stack plot') plt.legend(loc='upper left') plt.show() ```<|end|>
<|user|> Show moisturizer sales data of each month using a scatter plot.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['moisturizer'].tolist() plt.scatter(monthList, salesData, label='moisturizer Sales data') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('moisturizer Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Show shampoo sales data of each month using a line chart.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['shampoo'].tolist() plt.plot(monthList, salesData, label='shampoo Sales data', marker='o') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('shampoo Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Show toothpaste sales data of each month using a line chart.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['toothpaste'].tolist() plt.plot(monthList, salesData, label='toothpaste Sales data', marker='o') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('toothpaste Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Visualize facewash sales data of each month with a pie chart.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") salesData = df['facewash'].tolist() monthList = df['month_number'].tolist() plt.pie(salesData, labels=monthList, autopct='%1.1f%%') plt.title('facewash Sales data') plt.show() ```<|end|>
<|user|> Visualize soap sales data of each month with a line chart.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['soap'].tolist() plt.plot(monthList, salesData, label='soap Sales data', marker='o') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('soap Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Visualize facewash sales data of each month with a histogram.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") salesData = df['facewash'].tolist() plt.hist(salesData, bins=5, edgecolor='black') plt.xlabel('Sales Data') plt.ylabel('Frequency') plt.title('facewash Sales data') plt.show() ```<|end|>
<|user|> Visualize toothpaste sales data of each month with a histogram.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") salesData = df['toothpaste'].tolist() plt.hist(salesData, bins=5, edgecolor='black') plt.xlabel('Sales Data') plt.ylabel('Frequency') plt.title('toothpaste Sales data') plt.show() ```<|end|>
<|user|> Create a histogram chart for shampoo sales data of each month.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") salesData = df['shampoo'].tolist() plt.hist(salesData, bins=5, edgecolor='black') plt.xlabel('Sales Data') plt.ylabel('Frequency') plt.title('shampoo Sales data') plt.show() ```<|end|>
<|user|> Visualize moisturizer sales data of each month with a bar chart.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['moisturizer'].tolist() plt.bar(monthList, salesData, label='moisturizer Sales data') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('moisturizer Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Visualize toothpaste sales data of each month with a bar chart.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['toothpaste'].tolist() plt.bar(monthList, salesData, label='toothpaste Sales data') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('toothpaste Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Visualize shampoo sales data of each month with a histogram.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") salesData = df['shampoo'].tolist() plt.hist(salesData, bins=5, edgecolor='black') plt.xlabel('Sales Data') plt.ylabel('Frequency') plt.title('shampoo Sales data') plt.show() ```<|end|>
<|user|> Read moisturizer sales data and plot a pie chart chart for each month.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") salesData = df['moisturizer'].tolist() monthList = df['month_number'].tolist() plt.pie(salesData, labels=monthList, autopct='%1.1f%%') plt.title('moisturizer Sales data') plt.show() ```<|end|>
<|user|> Create a histogram chart for toothpaste sales data of each month.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") salesData = df['toothpaste'].tolist() plt.hist(salesData, bins=5, edgecolor='black') plt.xlabel('Sales Data') plt.ylabel('Frequency') plt.title('toothpaste Sales data') plt.show() ```<|end|>
<|user|> Visualize toothpaste sales data of each month with a scatter plot.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['toothpaste'].tolist() plt.scatter(monthList, salesData, label='toothpaste Sales data') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('toothpaste Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Show toothpaste sales data of each month using a scatter plot.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['toothpaste'].tolist() plt.scatter(monthList, salesData, label='toothpaste Sales data') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('toothpaste Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Visualize toothpaste sales data of each month with a histogram.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") salesData = df['toothpaste'].tolist() plt.hist(salesData, bins=5, edgecolor='black') plt.xlabel('Sales Data') plt.ylabel('Frequency') plt.title('toothpaste Sales data') plt.show() ```<|end|>
<|user|> Visualize moisturizer sales data of each month with a line chart.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['moisturizer'].tolist() plt.plot(monthList, salesData, label='moisturizer Sales data', marker='o') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('moisturizer Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Create a pie chart chart for soap sales data of each month.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") salesData = df['soap'].tolist() monthList = df['month_number'].tolist() plt.pie(salesData, labels=monthList, autopct='%1.1f%%') plt.title('soap Sales data') plt.show() ```<|end|>
<|user|> Create a histogram chart for facewash sales data of each month.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") salesData = df['facewash'].tolist() plt.hist(salesData, bins=5, edgecolor='black') plt.xlabel('Sales Data') plt.ylabel('Frequency') plt.title('facewash Sales data') plt.show() ```<|end|>
<|user|> Show moisturizer sales data of each month using a pie chart.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") salesData = df['moisturizer'].tolist() monthList = df['month_number'].tolist() plt.pie(salesData, labels=monthList, autopct='%1.1f%%') plt.title('moisturizer Sales data') plt.show() ```<|end|>
<|user|> Read soap sales data and plot a bar chart chart for each month.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['soap'].tolist() plt.bar(monthList, salesData, label='soap Sales data') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('soap Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Show shampoo sales data of each month using a pie chart.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") salesData = df['shampoo'].tolist() monthList = df['month_number'].tolist() plt.pie(salesData, labels=monthList, autopct='%1.1f%%') plt.title('shampoo Sales data') plt.show() ```<|end|>
<|user|> Create a histogram chart for toothpaste sales data of each month.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") salesData = df['toothpaste'].tolist() plt.hist(salesData, bins=5, edgecolor='black') plt.xlabel('Sales Data') plt.ylabel('Frequency') plt.title('toothpaste Sales data') plt.show() ```<|end|>
<|user|> Create a histogram chart for soap sales data of each month.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") salesData = df['soap'].tolist() plt.hist(salesData, bins=5, edgecolor='black') plt.xlabel('Sales Data') plt.ylabel('Frequency') plt.title('soap Sales data') plt.show() ```<|end|>
<|user|> Read toothpaste sales data and plot a histogram chart for each month.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") salesData = df['toothpaste'].tolist() plt.hist(salesData, bins=5, edgecolor='black') plt.xlabel('Sales Data') plt.ylabel('Frequency') plt.title('toothpaste Sales data') plt.show() ```<|end|>
<|user|> Read toothpaste sales data and plot a scatter plot chart for each month.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['toothpaste'].tolist() plt.scatter(monthList, salesData, label='toothpaste Sales data') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('toothpaste Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Read shampoo sales data and plot a bar chart chart for each month.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['shampoo'].tolist() plt.bar(monthList, salesData, label='shampoo Sales data') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('shampoo Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Create a pie chart chart for soap sales data of each month.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") salesData = df['soap'].tolist() monthList = df['month_number'].tolist() plt.pie(salesData, labels=monthList, autopct='%1.1f%%') plt.title('soap Sales data') plt.show() ```<|end|>
<|user|> Read shampoo sales data and plot a histogram chart for each month.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") salesData = df['shampoo'].tolist() plt.hist(salesData, bins=5, edgecolor='black') plt.xlabel('Sales Data') plt.ylabel('Frequency') plt.title('shampoo Sales data') plt.show() ```<|end|>
<|user|> Read toothpaste sales data of each month and show it using a scatter plot.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['toothpaste'].tolist() plt.scatter(monthList, salesData, label='toothpaste Sales data') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('toothpaste Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Create a line chart chart for moisturizer sales data of each month.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['moisturizer'].tolist() plt.plot(monthList, salesData, label='moisturizer Sales data', marker='o') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('moisturizer Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Create a line chart chart for facewash sales data of each month.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['facewash'].tolist() plt.plot(monthList, salesData, label='facewash Sales data', marker='o') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('facewash Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Read moisturizer sales data and plot a line chart chart for each month.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['moisturizer'].tolist() plt.plot(monthList, salesData, label='moisturizer Sales data', marker='o') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('moisturizer Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Read soap sales data and plot a bar chart chart for each month.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['soap'].tolist() plt.bar(monthList, salesData, label='soap Sales data') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('soap Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Visualize moisturizer sales data of each month with a line chart.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['moisturizer'].tolist() plt.plot(monthList, salesData, label='moisturizer Sales data', marker='o') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('moisturizer Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Visualize soap sales data of each month with a line chart.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['soap'].tolist() plt.plot(monthList, salesData, label='soap Sales data', marker='o') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('soap Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Read facewash sales data and plot a bar chart chart for each month.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['facewash'].tolist() plt.bar(monthList, salesData, label='facewash Sales data') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('facewash Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Show shampoo sales data of each month using a scatter plot.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['shampoo'].tolist() plt.scatter(monthList, salesData, label='shampoo Sales data') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('shampoo Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Read toothpaste sales data of each month and show it using a scatter plot.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['toothpaste'].tolist() plt.scatter(monthList, salesData, label='toothpaste Sales data') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('toothpaste Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Read soap sales data and plot a histogram chart for each month.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") salesData = df['soap'].tolist() plt.hist(salesData, bins=5, edgecolor='black') plt.xlabel('Sales Data') plt.ylabel('Frequency') plt.title('soap Sales data') plt.show() ```<|end|>
<|user|> Visualize soap sales data of each month with a pie chart.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") salesData = df['soap'].tolist() monthList = df['month_number'].tolist() plt.pie(salesData, labels=monthList, autopct='%1.1f%%') plt.title('soap Sales data') plt.show() ```<|end|>
<|user|> Read moisturizer sales data and plot a pie chart chart for each month.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") salesData = df['moisturizer'].tolist() monthList = df['month_number'].tolist() plt.pie(salesData, labels=monthList, autopct='%1.1f%%') plt.title('moisturizer Sales data') plt.show() ```<|end|>
<|user|> Show moisturizer sales data of each month using a bar chart.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['moisturizer'].tolist() plt.bar(monthList, salesData, label='moisturizer Sales data') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('moisturizer Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Read moisturizer sales data of each month and show it using a line chart.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['moisturizer'].tolist() plt.plot(monthList, salesData, label='moisturizer Sales data', marker='o') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('moisturizer Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Read moisturizer sales data and plot a scatter plot chart for each month.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['moisturizer'].tolist() plt.scatter(monthList, salesData, label='moisturizer Sales data') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('moisturizer Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Read shampoo sales data of each month and show it using a line chart.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['shampoo'].tolist() plt.plot(monthList, salesData, label='shampoo Sales data', marker='o') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('shampoo Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Read shampoo sales data and plot a bar chart chart for each month.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['shampoo'].tolist() plt.bar(monthList, salesData, label='shampoo Sales data') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('shampoo Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Show shampoo sales data of each month using a bar chart.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['shampoo'].tolist() plt.bar(monthList, salesData, label='shampoo Sales data') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('shampoo Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Visualize soap sales data of each month with a line chart.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['soap'].tolist() plt.plot(monthList, salesData, label='soap Sales data', marker='o') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('soap Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Show shampoo sales data of each month using a pie chart.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") salesData = df['shampoo'].tolist() monthList = df['month_number'].tolist() plt.pie(salesData, labels=monthList, autopct='%1.1f%%') plt.title('shampoo Sales data') plt.show() ```<|end|>
<|user|> Create a histogram chart for soap sales data of each month.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") salesData = df['soap'].tolist() plt.hist(salesData, bins=5, edgecolor='black') plt.xlabel('Sales Data') plt.ylabel('Frequency') plt.title('soap Sales data') plt.show() ```<|end|>
<|user|> Show shampoo sales data of each month using a line chart.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['shampoo'].tolist() plt.plot(monthList, salesData, label='shampoo Sales data', marker='o') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('shampoo Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Read facewash sales data of each month and show it using a pie chart.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") salesData = df['facewash'].tolist() monthList = df['month_number'].tolist() plt.pie(salesData, labels=monthList, autopct='%1.1f%%') plt.title('facewash Sales data') plt.show() ```<|end|>
<|user|> Show toothpaste sales data of each month using a scatter plot.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['toothpaste'].tolist() plt.scatter(monthList, salesData, label='toothpaste Sales data') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('toothpaste Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Read toothpaste sales data of each month and show it using a pie chart.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") salesData = df['toothpaste'].tolist() monthList = df['month_number'].tolist() plt.pie(salesData, labels=monthList, autopct='%1.1f%%') plt.title('toothpaste Sales data') plt.show() ```<|end|>
<|user|> Create a line chart chart for moisturizer sales data of each month.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['moisturizer'].tolist() plt.plot(monthList, salesData, label='moisturizer Sales data', marker='o') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('moisturizer Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Visualize soap sales data of each month with a pie chart.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") salesData = df['soap'].tolist() monthList = df['month_number'].tolist() plt.pie(salesData, labels=monthList, autopct='%1.1f%%') plt.title('soap Sales data') plt.show() ```<|end|>
<|user|> Show moisturizer sales data of each month using a histogram.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") salesData = df['moisturizer'].tolist() plt.hist(salesData, bins=5, edgecolor='black') plt.xlabel('Sales Data') plt.ylabel('Frequency') plt.title('moisturizer Sales data') plt.show() ```<|end|>
<|user|> Show facewash sales data of each month using a bar chart.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['facewash'].tolist() plt.bar(monthList, salesData, label='facewash Sales data') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('facewash Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Visualize facewash sales data of each month with a scatter plot.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['facewash'].tolist() plt.scatter(monthList, salesData, label='facewash Sales data') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('facewash Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Read toothpaste sales data of each month and show it using a bar chart.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['toothpaste'].tolist() plt.bar(monthList, salesData, label='toothpaste Sales data') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('toothpaste Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Read shampoo sales data of each month and show it using a scatter plot.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['shampoo'].tolist() plt.scatter(monthList, salesData, label='shampoo Sales data') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('shampoo Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Create a scatter plot chart for soap sales data of each month.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['soap'].tolist() plt.scatter(monthList, salesData, label='soap Sales data') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('soap Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Show facewash sales data of each month using a bar chart.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['facewash'].tolist() plt.bar(monthList, salesData, label='facewash Sales data') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('facewash Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Read moisturizer sales data and plot a bar chart chart for each month.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['moisturizer'].tolist() plt.bar(monthList, salesData, label='moisturizer Sales data') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('moisturizer Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Create a bar chart chart for soap sales data of each month.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['soap'].tolist() plt.bar(monthList, salesData, label='soap Sales data') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('soap Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Visualize shampoo sales data of each month with a pie chart.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") salesData = df['shampoo'].tolist() monthList = df['month_number'].tolist() plt.pie(salesData, labels=monthList, autopct='%1.1f%%') plt.title('shampoo Sales data') plt.show() ```<|end|>
<|user|> Read shampoo sales data and plot a line chart chart for each month.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['shampoo'].tolist() plt.plot(monthList, salesData, label='shampoo Sales data', marker='o') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('shampoo Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Visualize toothpaste sales data of each month with a bar chart.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['toothpaste'].tolist() plt.bar(monthList, salesData, label='toothpaste Sales data') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('toothpaste Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Visualize toothpaste sales data of each month with a scatter plot.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['toothpaste'].tolist() plt.scatter(monthList, salesData, label='toothpaste Sales data') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('toothpaste Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Read facewash sales data of each month and show it using a pie chart.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") salesData = df['facewash'].tolist() monthList = df['month_number'].tolist() plt.pie(salesData, labels=monthList, autopct='%1.1f%%') plt.title('facewash Sales data') plt.show() ```<|end|>
<|user|> Read shampoo sales data and plot a pie chart chart for each month.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") salesData = df['shampoo'].tolist() monthList = df['month_number'].tolist() plt.pie(salesData, labels=monthList, autopct='%1.1f%%') plt.title('shampoo Sales data') plt.show() ```<|end|>
<|user|> Read shampoo sales data and plot a histogram chart for each month.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") salesData = df['shampoo'].tolist() plt.hist(salesData, bins=5, edgecolor='black') plt.xlabel('Sales Data') plt.ylabel('Frequency') plt.title('shampoo Sales data') plt.show() ```<|end|>
<|user|> Create a pie chart chart for moisturizer sales data of each month.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") salesData = df['moisturizer'].tolist() monthList = df['month_number'].tolist() plt.pie(salesData, labels=monthList, autopct='%1.1f%%') plt.title('moisturizer Sales data') plt.show() ```<|end|>
<|user|> Create a line chart chart for shampoo sales data of each month.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['shampoo'].tolist() plt.plot(monthList, salesData, label='shampoo Sales data', marker='o') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('shampoo Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Visualize toothpaste sales data of each month with a pie chart.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") salesData = df['toothpaste'].tolist() monthList = df['month_number'].tolist() plt.pie(salesData, labels=monthList, autopct='%1.1f%%') plt.title('toothpaste Sales data') plt.show() ```<|end|>
<|user|> Create a scatter plot chart for moisturizer sales data of each month.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['moisturizer'].tolist() plt.scatter(monthList, salesData, label='moisturizer Sales data') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('moisturizer Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Show shampoo sales data of each month using a scatter plot.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['shampoo'].tolist() plt.scatter(monthList, salesData, label='shampoo Sales data') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('shampoo Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Read soap sales data and plot a bar chart chart for each month.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['soap'].tolist() plt.bar(monthList, salesData, label='soap Sales data') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('soap Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Read toothpaste sales data of each month and show it using a bar chart.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['toothpaste'].tolist() plt.bar(monthList, salesData, label='toothpaste Sales data') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('toothpaste Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Visualize soap sales data of each month with a pie chart.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") salesData = df['soap'].tolist() monthList = df['month_number'].tolist() plt.pie(salesData, labels=monthList, autopct='%1.1f%%') plt.title('soap Sales data') plt.show() ```<|end|>
<|user|> Show toothpaste sales data of each month using a bar chart.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['toothpaste'].tolist() plt.bar(monthList, salesData, label='toothpaste Sales data') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('toothpaste Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Read toothpaste sales data of each month and show it using a scatter plot.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['toothpaste'].tolist() plt.scatter(monthList, salesData, label='toothpaste Sales data') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('toothpaste Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Read toothpaste sales data and plot a scatter plot chart for each month.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['toothpaste'].tolist() plt.scatter(monthList, salesData, label='toothpaste Sales data') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('toothpaste Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Create a bar chart chart for facewash sales data of each month.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['facewash'].tolist() plt.bar(monthList, salesData, label='facewash Sales data') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('facewash Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Visualize soap sales data of each month with a pie chart.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") salesData = df['soap'].tolist() monthList = df['month_number'].tolist() plt.pie(salesData, labels=monthList, autopct='%1.1f%%') plt.title('soap Sales data') plt.show() ```<|end|>
<|user|> Create a histogram chart for soap sales data of each month.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") salesData = df['soap'].tolist() plt.hist(salesData, bins=5, edgecolor='black') plt.xlabel('Sales Data') plt.ylabel('Frequency') plt.title('soap Sales data') plt.show() ```<|end|>
<|user|> Visualize moisturizer sales data of each month with a pie chart.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") salesData = df['moisturizer'].tolist() monthList = df['month_number'].tolist() plt.pie(salesData, labels=monthList, autopct='%1.1f%%') plt.title('moisturizer Sales data') plt.show() ```<|end|>
<|user|> Read toothpaste sales data of each month and show it using a scatter plot.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['toothpaste'].tolist() plt.scatter(monthList, salesData, label='toothpaste Sales data') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('toothpaste Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>
<|user|> Visualize shampoo sales data of each month with a scatter plot.<|end|> <|assistant|> ```python import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv("D:\Python\Articles\matplotlib\sales_data.csv") monthList = df['month_number'].tolist() salesData = df['shampoo'].tolist() plt.scatter(monthList, salesData, label='shampoo Sales data') plt.xlabel('Month Number') plt.ylabel('Number of units Sold') plt.legend(loc='upper left') plt.title('shampoo Sales data') plt.xticks(monthList) plt.grid(True, linewidth=1, linestyle="--") plt.show() ```<|end|>