formatted_text
stringclasses 135
values |
---|
<|user|>
Read moisturizer sales data of each month and show it 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|>
Read soap 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['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|>
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|>
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|>
Read facewash sales data of each month and show it 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['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|>
Read soap 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['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|>
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|>
Show moisturizer 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['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 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|>
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|>
|