GloryIX commited on
Commit
2ac4f99
·
verified ·
1 Parent(s): 31ebe70

Upload 2 files

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ Global_Superstore2.csv filter=lfs diff=lfs merge=lfs -text
Global_Superstore2.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f4653031058bce3c6c510e0d113144133b36f83fa9bf03c03d66cf6c0567b89c
3
+ size 12089916
sample_requests_and_code_300plus.csv ADDED
@@ -0,0 +1,1298 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ request,code
2
+ "Get all orders from 'Brazil' where sales are greater than 1321, and plot the sales distribution.","
3
+ import pandas as pd
4
+ import matplotlib.pyplot as plt
5
+
6
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
7
+ df = df[(df['Country'] == 'Brazil') & (df['Sales'] > 1321)]
8
+
9
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
10
+ plt.xlabel('Sales Value')
11
+ plt.ylabel('Frequency')
12
+ plt.legend()
13
+ plt.show()
14
+ "
15
+ Display total sales by category and segment in a stacked bar chart.,"
16
+ import pandas as pd
17
+ import matplotlib.pyplot as plt
18
+
19
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
20
+ sales_summary = df.groupby(['Category', 'Segment'])['Sales'].sum().unstack()
21
+
22
+ sales_summary.plot(kind='bar', stacked=True, title='Total Sales by Category and Segment')
23
+ plt.ylabel('Total Sales')
24
+ plt.xlabel('Category')
25
+ plt.show()
26
+ "
27
+ Compare shipping modes by total sales for 'France' in 2015 and plot the results.,"
28
+ import pandas as pd
29
+ import matplotlib.pyplot as plt
30
+
31
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
32
+ df_filtered = df[(df['Country'] == 'France') & (df['Order Date'].str.contains('2015'))]
33
+ ship_sales = df_filtered.groupby('Ship Mode')['Sales'].sum()
34
+
35
+ ship_sales.plot(kind='bar', title='Sales by Shipping Mode in France (2015)')
36
+ plt.ylabel('Total Sales')
37
+ plt.xlabel('Shipping Mode')
38
+ plt.show()
39
+ "
40
+ Calculate average discount for 'Technology' category by segment and visualize using a bar chart.,"
41
+ import pandas as pd
42
+ import matplotlib.pyplot as plt
43
+
44
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
45
+ avg_discount = df[df['Category'] == 'Technology'].groupby('Segment')['Discount'].mean()
46
+
47
+ avg_discount.plot(kind='bar', title='Average Discount by Segment for Technology')
48
+ plt.ylabel('Average Discount')
49
+ plt.xlabel('Segment')
50
+ plt.show()
51
+ "
52
+ Plot the profit distribution for 'Corporate' segment in 2017.,"
53
+ import pandas as pd
54
+ import matplotlib.pyplot as plt
55
+
56
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
57
+ df_filtered = df[(df['Segment'] == 'Corporate') & (df['Order Date'].str.contains('2017'))]
58
+
59
+ plt.hist(df_filtered['Profit'], bins=20, alpha=0.7)
60
+ plt.title('Profit Distribution for Corporate Segment in 2017')
61
+ plt.xlabel('Profit')
62
+ plt.ylabel('Frequency')
63
+ plt.show()
64
+ "
65
+ Show the top 10 products by total profit in 'South' region.,"
66
+ import pandas as pd
67
+ import matplotlib.pyplot as plt
68
+
69
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
70
+ top_products = df[df['Region'] == 'South'].groupby('Product Name')['Profit'].sum().nlargest(10)
71
+
72
+ top_products.plot(kind='bar', title='Top 10 Products by Profit in South')
73
+ plt.ylabel('Total Profit')
74
+ plt.xlabel('Product Name')
75
+ plt.show()
76
+ "
77
+ "Get all orders from 'France' where sales are greater than 1936, and plot the sales distribution.","
78
+ import pandas as pd
79
+ import matplotlib.pyplot as plt
80
+
81
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
82
+ df = df[(df['Country'] == 'France') & (df['Sales'] > 1936)]
83
+
84
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
85
+ plt.xlabel('Sales Value')
86
+ plt.ylabel('Frequency')
87
+ plt.legend()
88
+ plt.show()
89
+ "
90
+ Compare shipping modes by total sales for 'United States' in 2017 and plot the results.,"
91
+ import pandas as pd
92
+ import matplotlib.pyplot as plt
93
+
94
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
95
+ df_filtered = df[(df['Country'] == 'United States') & (df['Order Date'].str.contains('2017'))]
96
+ ship_sales = df_filtered.groupby('Ship Mode')['Sales'].sum()
97
+
98
+ ship_sales.plot(kind='bar', title='Sales by Shipping Mode in United States (2017)')
99
+ plt.ylabel('Total Sales')
100
+ plt.xlabel('Shipping Mode')
101
+ plt.show()
102
+ "
103
+ Calculate average discount for 'Office Supplies' category by segment and visualize using a bar chart.,"
104
+ import pandas as pd
105
+ import matplotlib.pyplot as plt
106
+
107
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
108
+ avg_discount = df[df['Category'] == 'Office Supplies'].groupby('Segment')['Discount'].mean()
109
+
110
+ avg_discount.plot(kind='bar', title='Average Discount by Segment for Office Supplies')
111
+ plt.ylabel('Average Discount')
112
+ plt.xlabel('Segment')
113
+ plt.show()
114
+ "
115
+ Plot the profit distribution for 'Corporate' segment in 2014.,"
116
+ import pandas as pd
117
+ import matplotlib.pyplot as plt
118
+
119
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
120
+ df_filtered = df[(df['Segment'] == 'Corporate') & (df['Order Date'].str.contains('2014'))]
121
+
122
+ plt.hist(df_filtered['Profit'], bins=20, alpha=0.7)
123
+ plt.title('Profit Distribution for Corporate Segment in 2014')
124
+ plt.xlabel('Profit')
125
+ plt.ylabel('Frequency')
126
+ plt.show()
127
+ "
128
+ "Get all orders from 'France' where sales are greater than 1906, and plot the sales distribution.","
129
+ import pandas as pd
130
+ import matplotlib.pyplot as plt
131
+
132
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
133
+ df = df[(df['Country'] == 'France') & (df['Sales'] > 1906)]
134
+
135
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
136
+ plt.xlabel('Sales Value')
137
+ plt.ylabel('Frequency')
138
+ plt.legend()
139
+ plt.show()
140
+ "
141
+ Compare shipping modes by total sales for 'France' in 2014 and plot the results.,"
142
+ import pandas as pd
143
+ import matplotlib.pyplot as plt
144
+
145
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
146
+ df_filtered = df[(df['Country'] == 'France') & (df['Order Date'].str.contains('2014'))]
147
+ ship_sales = df_filtered.groupby('Ship Mode')['Sales'].sum()
148
+
149
+ ship_sales.plot(kind='bar', title='Sales by Shipping Mode in France (2014)')
150
+ plt.ylabel('Total Sales')
151
+ plt.xlabel('Shipping Mode')
152
+ plt.show()
153
+ "
154
+ Compare shipping modes by total sales for 'India' in 2014 and plot the results.,"
155
+ import pandas as pd
156
+ import matplotlib.pyplot as plt
157
+
158
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
159
+ df_filtered = df[(df['Country'] == 'India') & (df['Order Date'].str.contains('2014'))]
160
+ ship_sales = df_filtered.groupby('Ship Mode')['Sales'].sum()
161
+
162
+ ship_sales.plot(kind='bar', title='Sales by Shipping Mode in India (2014)')
163
+ plt.ylabel('Total Sales')
164
+ plt.xlabel('Shipping Mode')
165
+ plt.show()
166
+ "
167
+ "Get all orders from 'Saudi Arabia' where sales are greater than 949, and plot the sales distribution.","
168
+ import pandas as pd
169
+ import matplotlib.pyplot as plt
170
+
171
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
172
+ df = df[(df['Country'] == 'Saudi Arabia') & (df['Sales'] > 949)]
173
+
174
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
175
+ plt.xlabel('Sales Value')
176
+ plt.ylabel('Frequency')
177
+ plt.legend()
178
+ plt.show()
179
+ "
180
+ "Get all orders from 'Canada' where sales are greater than 605, and plot the sales distribution.","
181
+ import pandas as pd
182
+ import matplotlib.pyplot as plt
183
+
184
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
185
+ df = df[(df['Country'] == 'Canada') & (df['Sales'] > 605)]
186
+
187
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
188
+ plt.xlabel('Sales Value')
189
+ plt.ylabel('Frequency')
190
+ plt.legend()
191
+ plt.show()
192
+ "
193
+ Plot the profit distribution for 'Corporate' segment in 2015.,"
194
+ import pandas as pd
195
+ import matplotlib.pyplot as plt
196
+
197
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
198
+ df_filtered = df[(df['Segment'] == 'Corporate') & (df['Order Date'].str.contains('2015'))]
199
+
200
+ plt.hist(df_filtered['Profit'], bins=20, alpha=0.7)
201
+ plt.title('Profit Distribution for Corporate Segment in 2015')
202
+ plt.xlabel('Profit')
203
+ plt.ylabel('Frequency')
204
+ plt.show()
205
+ "
206
+ Show the top 10 products by total profit in 'West' region.,"
207
+ import pandas as pd
208
+ import matplotlib.pyplot as plt
209
+
210
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
211
+ top_products = df[df['Region'] == 'West'].groupby('Product Name')['Profit'].sum().nlargest(10)
212
+
213
+ top_products.plot(kind='bar', title='Top 10 Products by Profit in West')
214
+ plt.ylabel('Total Profit')
215
+ plt.xlabel('Product Name')
216
+ plt.show()
217
+ "
218
+ Show the top 10 products by total profit in 'Central' region.,"
219
+ import pandas as pd
220
+ import matplotlib.pyplot as plt
221
+
222
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
223
+ top_products = df[df['Region'] == 'Central'].groupby('Product Name')['Profit'].sum().nlargest(10)
224
+
225
+ top_products.plot(kind='bar', title='Top 10 Products by Profit in Central')
226
+ plt.ylabel('Total Profit')
227
+ plt.xlabel('Product Name')
228
+ plt.show()
229
+ "
230
+ Identify the top 5 cities by total sales in 'Saudi Arabia' and display a horizontal bar chart.,"
231
+ import pandas as pd
232
+ import matplotlib.pyplot as plt
233
+
234
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
235
+ top_cities = df[df['Country'] == 'Saudi Arabia'].groupby('City')['Sales'].sum().nlargest(5)
236
+
237
+ top_cities.plot(kind='barh', title='Top 5 Cities by Sales in Saudi Arabia')
238
+ plt.xlabel('Total Sales')
239
+ plt.ylabel('City')
240
+ plt.show()
241
+ "
242
+ "Get all orders from 'Saudi Arabia' where sales are greater than 1572, and plot the sales distribution.","
243
+ import pandas as pd
244
+ import matplotlib.pyplot as plt
245
+
246
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
247
+ df = df[(df['Country'] == 'Saudi Arabia') & (df['Sales'] > 1572)]
248
+
249
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
250
+ plt.xlabel('Sales Value')
251
+ plt.ylabel('Frequency')
252
+ plt.legend()
253
+ plt.show()
254
+ "
255
+ Identify the top 5 cities by total sales in 'Brazil' and display a horizontal bar chart.,"
256
+ import pandas as pd
257
+ import matplotlib.pyplot as plt
258
+
259
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
260
+ top_cities = df[df['Country'] == 'Brazil'].groupby('City')['Sales'].sum().nlargest(5)
261
+
262
+ top_cities.plot(kind='barh', title='Top 5 Cities by Sales in Brazil')
263
+ plt.xlabel('Total Sales')
264
+ plt.ylabel('City')
265
+ plt.show()
266
+ "
267
+ Identify the top 5 cities by total sales in 'India' and display a horizontal bar chart.,"
268
+ import pandas as pd
269
+ import matplotlib.pyplot as plt
270
+
271
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
272
+ top_cities = df[df['Country'] == 'India'].groupby('City')['Sales'].sum().nlargest(5)
273
+
274
+ top_cities.plot(kind='barh', title='Top 5 Cities by Sales in India')
275
+ plt.xlabel('Total Sales')
276
+ plt.ylabel('City')
277
+ plt.show()
278
+ "
279
+ Calculate average discount for 'Furniture' category by segment and visualize using a bar chart.,"
280
+ import pandas as pd
281
+ import matplotlib.pyplot as plt
282
+
283
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
284
+ avg_discount = df[df['Category'] == 'Furniture'].groupby('Segment')['Discount'].mean()
285
+
286
+ avg_discount.plot(kind='bar', title='Average Discount by Segment for Furniture')
287
+ plt.ylabel('Average Discount')
288
+ plt.xlabel('Segment')
289
+ plt.show()
290
+ "
291
+ Identify the top 5 cities by total sales in 'Australia' and display a horizontal bar chart.,"
292
+ import pandas as pd
293
+ import matplotlib.pyplot as plt
294
+
295
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
296
+ top_cities = df[df['Country'] == 'Australia'].groupby('City')['Sales'].sum().nlargest(5)
297
+
298
+ top_cities.plot(kind='barh', title='Top 5 Cities by Sales in Australia')
299
+ plt.xlabel('Total Sales')
300
+ plt.ylabel('City')
301
+ plt.show()
302
+ "
303
+ "Get all orders from 'Brazil' where sales are greater than 601, and plot the sales distribution.","
304
+ import pandas as pd
305
+ import matplotlib.pyplot as plt
306
+
307
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
308
+ df = df[(df['Country'] == 'Brazil') & (df['Sales'] > 601)]
309
+
310
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
311
+ plt.xlabel('Sales Value')
312
+ plt.ylabel('Frequency')
313
+ plt.legend()
314
+ plt.show()
315
+ "
316
+ "Get all orders from 'Saudi Arabia' where sales are greater than 534, and plot the sales distribution.","
317
+ import pandas as pd
318
+ import matplotlib.pyplot as plt
319
+
320
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
321
+ df = df[(df['Country'] == 'Saudi Arabia') & (df['Sales'] > 534)]
322
+
323
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
324
+ plt.xlabel('Sales Value')
325
+ plt.ylabel('Frequency')
326
+ plt.legend()
327
+ plt.show()
328
+ "
329
+ Identify the top 5 cities by total sales in 'Germany' and display a horizontal bar chart.,"
330
+ import pandas as pd
331
+ import matplotlib.pyplot as plt
332
+
333
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
334
+ top_cities = df[df['Country'] == 'Germany'].groupby('City')['Sales'].sum().nlargest(5)
335
+
336
+ top_cities.plot(kind='barh', title='Top 5 Cities by Sales in Germany')
337
+ plt.xlabel('Total Sales')
338
+ plt.ylabel('City')
339
+ plt.show()
340
+ "
341
+ Compare shipping modes by total sales for 'Saudi Arabia' in 2014 and plot the results.,"
342
+ import pandas as pd
343
+ import matplotlib.pyplot as plt
344
+
345
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
346
+ df_filtered = df[(df['Country'] == 'Saudi Arabia') & (df['Order Date'].str.contains('2014'))]
347
+ ship_sales = df_filtered.groupby('Ship Mode')['Sales'].sum()
348
+
349
+ ship_sales.plot(kind='bar', title='Sales by Shipping Mode in Saudi Arabia (2014)')
350
+ plt.ylabel('Total Sales')
351
+ plt.xlabel('Shipping Mode')
352
+ plt.show()
353
+ "
354
+ Compare shipping modes by total sales for 'Brazil' in 2014 and plot the results.,"
355
+ import pandas as pd
356
+ import matplotlib.pyplot as plt
357
+
358
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
359
+ df_filtered = df[(df['Country'] == 'Brazil') & (df['Order Date'].str.contains('2014'))]
360
+ ship_sales = df_filtered.groupby('Ship Mode')['Sales'].sum()
361
+
362
+ ship_sales.plot(kind='bar', title='Sales by Shipping Mode in Brazil (2014)')
363
+ plt.ylabel('Total Sales')
364
+ plt.xlabel('Shipping Mode')
365
+ plt.show()
366
+ "
367
+ "Get all orders from 'United States' where sales are greater than 1742, and plot the sales distribution.","
368
+ import pandas as pd
369
+ import matplotlib.pyplot as plt
370
+
371
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
372
+ df = df[(df['Country'] == 'United States') & (df['Sales'] > 1742)]
373
+
374
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
375
+ plt.xlabel('Sales Value')
376
+ plt.ylabel('Frequency')
377
+ plt.legend()
378
+ plt.show()
379
+ "
380
+ Plot the profit distribution for 'Home Office' segment in 2016.,"
381
+ import pandas as pd
382
+ import matplotlib.pyplot as plt
383
+
384
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
385
+ df_filtered = df[(df['Segment'] == 'Home Office') & (df['Order Date'].str.contains('2016'))]
386
+
387
+ plt.hist(df_filtered['Profit'], bins=20, alpha=0.7)
388
+ plt.title('Profit Distribution for Home Office Segment in 2016')
389
+ plt.xlabel('Profit')
390
+ plt.ylabel('Frequency')
391
+ plt.show()
392
+ "
393
+ "Get all orders from 'Brazil' where sales are greater than 1440, and plot the sales distribution.","
394
+ import pandas as pd
395
+ import matplotlib.pyplot as plt
396
+
397
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
398
+ df = df[(df['Country'] == 'Brazil') & (df['Sales'] > 1440)]
399
+
400
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
401
+ plt.xlabel('Sales Value')
402
+ plt.ylabel('Frequency')
403
+ plt.legend()
404
+ plt.show()
405
+ "
406
+ Compare shipping modes by total sales for 'France' in 2017 and plot the results.,"
407
+ import pandas as pd
408
+ import matplotlib.pyplot as plt
409
+
410
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
411
+ df_filtered = df[(df['Country'] == 'France') & (df['Order Date'].str.contains('2017'))]
412
+ ship_sales = df_filtered.groupby('Ship Mode')['Sales'].sum()
413
+
414
+ ship_sales.plot(kind='bar', title='Sales by Shipping Mode in France (2017)')
415
+ plt.ylabel('Total Sales')
416
+ plt.xlabel('Shipping Mode')
417
+ plt.show()
418
+ "
419
+ Plot the profit distribution for 'Consumer' segment in 2014.,"
420
+ import pandas as pd
421
+ import matplotlib.pyplot as plt
422
+
423
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
424
+ df_filtered = df[(df['Segment'] == 'Consumer') & (df['Order Date'].str.contains('2014'))]
425
+
426
+ plt.hist(df_filtered['Profit'], bins=20, alpha=0.7)
427
+ plt.title('Profit Distribution for Consumer Segment in 2014')
428
+ plt.xlabel('Profit')
429
+ plt.ylabel('Frequency')
430
+ plt.show()
431
+ "
432
+ Show the top 10 products by total profit in 'East' region.,"
433
+ import pandas as pd
434
+ import matplotlib.pyplot as plt
435
+
436
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
437
+ top_products = df[df['Region'] == 'East'].groupby('Product Name')['Profit'].sum().nlargest(10)
438
+
439
+ top_products.plot(kind='bar', title='Top 10 Products by Profit in East')
440
+ plt.ylabel('Total Profit')
441
+ plt.xlabel('Product Name')
442
+ plt.show()
443
+ "
444
+ Plot the profit distribution for 'Consumer' segment in 2017.,"
445
+ import pandas as pd
446
+ import matplotlib.pyplot as plt
447
+
448
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
449
+ df_filtered = df[(df['Segment'] == 'Consumer') & (df['Order Date'].str.contains('2017'))]
450
+
451
+ plt.hist(df_filtered['Profit'], bins=20, alpha=0.7)
452
+ plt.title('Profit Distribution for Consumer Segment in 2017')
453
+ plt.xlabel('Profit')
454
+ plt.ylabel('Frequency')
455
+ plt.show()
456
+ "
457
+ Plot the profit distribution for 'Corporate' segment in 2016.,"
458
+ import pandas as pd
459
+ import matplotlib.pyplot as plt
460
+
461
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
462
+ df_filtered = df[(df['Segment'] == 'Corporate') & (df['Order Date'].str.contains('2016'))]
463
+
464
+ plt.hist(df_filtered['Profit'], bins=20, alpha=0.7)
465
+ plt.title('Profit Distribution for Corporate Segment in 2016')
466
+ plt.xlabel('Profit')
467
+ plt.ylabel('Frequency')
468
+ plt.show()
469
+ "
470
+ Compare shipping modes by total sales for 'United States' in 2015 and plot the results.,"
471
+ import pandas as pd
472
+ import matplotlib.pyplot as plt
473
+
474
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
475
+ df_filtered = df[(df['Country'] == 'United States') & (df['Order Date'].str.contains('2015'))]
476
+ ship_sales = df_filtered.groupby('Ship Mode')['Sales'].sum()
477
+
478
+ ship_sales.plot(kind='bar', title='Sales by Shipping Mode in United States (2015)')
479
+ plt.ylabel('Total Sales')
480
+ plt.xlabel('Shipping Mode')
481
+ plt.show()
482
+ "
483
+ Plot the profit distribution for 'Consumer' segment in 2016.,"
484
+ import pandas as pd
485
+ import matplotlib.pyplot as plt
486
+
487
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
488
+ df_filtered = df[(df['Segment'] == 'Consumer') & (df['Order Date'].str.contains('2016'))]
489
+
490
+ plt.hist(df_filtered['Profit'], bins=20, alpha=0.7)
491
+ plt.title('Profit Distribution for Consumer Segment in 2016')
492
+ plt.xlabel('Profit')
493
+ plt.ylabel('Frequency')
494
+ plt.show()
495
+ "
496
+ Compare shipping modes by total sales for 'Germany' in 2014 and plot the results.,"
497
+ import pandas as pd
498
+ import matplotlib.pyplot as plt
499
+
500
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
501
+ df_filtered = df[(df['Country'] == 'Germany') & (df['Order Date'].str.contains('2014'))]
502
+ ship_sales = df_filtered.groupby('Ship Mode')['Sales'].sum()
503
+
504
+ ship_sales.plot(kind='bar', title='Sales by Shipping Mode in Germany (2014)')
505
+ plt.ylabel('Total Sales')
506
+ plt.xlabel('Shipping Mode')
507
+ plt.show()
508
+ "
509
+ "Get all orders from 'Australia' where sales are greater than 921, and plot the sales distribution.","
510
+ import pandas as pd
511
+ import matplotlib.pyplot as plt
512
+
513
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
514
+ df = df[(df['Country'] == 'Australia') & (df['Sales'] > 921)]
515
+
516
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
517
+ plt.xlabel('Sales Value')
518
+ plt.ylabel('Frequency')
519
+ plt.legend()
520
+ plt.show()
521
+ "
522
+ Plot the profit distribution for 'Home Office' segment in 2017.,"
523
+ import pandas as pd
524
+ import matplotlib.pyplot as plt
525
+
526
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
527
+ df_filtered = df[(df['Segment'] == 'Home Office') & (df['Order Date'].str.contains('2017'))]
528
+
529
+ plt.hist(df_filtered['Profit'], bins=20, alpha=0.7)
530
+ plt.title('Profit Distribution for Home Office Segment in 2017')
531
+ plt.xlabel('Profit')
532
+ plt.ylabel('Frequency')
533
+ plt.show()
534
+ "
535
+ Compare shipping modes by total sales for 'Australia' in 2016 and plot the results.,"
536
+ import pandas as pd
537
+ import matplotlib.pyplot as plt
538
+
539
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
540
+ df_filtered = df[(df['Country'] == 'Australia') & (df['Order Date'].str.contains('2016'))]
541
+ ship_sales = df_filtered.groupby('Ship Mode')['Sales'].sum()
542
+
543
+ ship_sales.plot(kind='bar', title='Sales by Shipping Mode in Australia (2016)')
544
+ plt.ylabel('Total Sales')
545
+ plt.xlabel('Shipping Mode')
546
+ plt.show()
547
+ "
548
+ Compare shipping modes by total sales for 'Germany' in 2015 and plot the results.,"
549
+ import pandas as pd
550
+ import matplotlib.pyplot as plt
551
+
552
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
553
+ df_filtered = df[(df['Country'] == 'Germany') & (df['Order Date'].str.contains('2015'))]
554
+ ship_sales = df_filtered.groupby('Ship Mode')['Sales'].sum()
555
+
556
+ ship_sales.plot(kind='bar', title='Sales by Shipping Mode in Germany (2015)')
557
+ plt.ylabel('Total Sales')
558
+ plt.xlabel('Shipping Mode')
559
+ plt.show()
560
+ "
561
+ Plot the profit distribution for 'Home Office' segment in 2014.,"
562
+ import pandas as pd
563
+ import matplotlib.pyplot as plt
564
+
565
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
566
+ df_filtered = df[(df['Segment'] == 'Home Office') & (df['Order Date'].str.contains('2014'))]
567
+
568
+ plt.hist(df_filtered['Profit'], bins=20, alpha=0.7)
569
+ plt.title('Profit Distribution for Home Office Segment in 2014')
570
+ plt.xlabel('Profit')
571
+ plt.ylabel('Frequency')
572
+ plt.show()
573
+ "
574
+ Plot the profit distribution for 'Consumer' segment in 2015.,"
575
+ import pandas as pd
576
+ import matplotlib.pyplot as plt
577
+
578
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
579
+ df_filtered = df[(df['Segment'] == 'Consumer') & (df['Order Date'].str.contains('2015'))]
580
+
581
+ plt.hist(df_filtered['Profit'], bins=20, alpha=0.7)
582
+ plt.title('Profit Distribution for Consumer Segment in 2015')
583
+ plt.xlabel('Profit')
584
+ plt.ylabel('Frequency')
585
+ plt.show()
586
+ "
587
+ "Get all orders from 'Germany' where sales are greater than 1124, and plot the sales distribution.","
588
+ import pandas as pd
589
+ import matplotlib.pyplot as plt
590
+
591
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
592
+ df = df[(df['Country'] == 'Germany') & (df['Sales'] > 1124)]
593
+
594
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
595
+ plt.xlabel('Sales Value')
596
+ plt.ylabel('Frequency')
597
+ plt.legend()
598
+ plt.show()
599
+ "
600
+ "Get all orders from 'Germany' where sales are greater than 638, and plot the sales distribution.","
601
+ import pandas as pd
602
+ import matplotlib.pyplot as plt
603
+
604
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
605
+ df = df[(df['Country'] == 'Germany') & (df['Sales'] > 638)]
606
+
607
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
608
+ plt.xlabel('Sales Value')
609
+ plt.ylabel('Frequency')
610
+ plt.legend()
611
+ plt.show()
612
+ "
613
+ "Get all orders from 'Canada' where sales are greater than 1004, and plot the sales distribution.","
614
+ import pandas as pd
615
+ import matplotlib.pyplot as plt
616
+
617
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
618
+ df = df[(df['Country'] == 'Canada') & (df['Sales'] > 1004)]
619
+
620
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
621
+ plt.xlabel('Sales Value')
622
+ plt.ylabel('Frequency')
623
+ plt.legend()
624
+ plt.show()
625
+ "
626
+ Plot the profit distribution for 'Home Office' segment in 2015.,"
627
+ import pandas as pd
628
+ import matplotlib.pyplot as plt
629
+
630
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
631
+ df_filtered = df[(df['Segment'] == 'Home Office') & (df['Order Date'].str.contains('2015'))]
632
+
633
+ plt.hist(df_filtered['Profit'], bins=20, alpha=0.7)
634
+ plt.title('Profit Distribution for Home Office Segment in 2015')
635
+ plt.xlabel('Profit')
636
+ plt.ylabel('Frequency')
637
+ plt.show()
638
+ "
639
+ Identify the top 5 cities by total sales in 'United States' and display a horizontal bar chart.,"
640
+ import pandas as pd
641
+ import matplotlib.pyplot as plt
642
+
643
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
644
+ top_cities = df[df['Country'] == 'United States'].groupby('City')['Sales'].sum().nlargest(5)
645
+
646
+ top_cities.plot(kind='barh', title='Top 5 Cities by Sales in United States')
647
+ plt.xlabel('Total Sales')
648
+ plt.ylabel('City')
649
+ plt.show()
650
+ "
651
+ "Get all orders from 'India' where sales are greater than 1567, and plot the sales distribution.","
652
+ import pandas as pd
653
+ import matplotlib.pyplot as plt
654
+
655
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
656
+ df = df[(df['Country'] == 'India') & (df['Sales'] > 1567)]
657
+
658
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
659
+ plt.xlabel('Sales Value')
660
+ plt.ylabel('Frequency')
661
+ plt.legend()
662
+ plt.show()
663
+ "
664
+ "Get all orders from 'Germany' where sales are greater than 1159, and plot the sales distribution.","
665
+ import pandas as pd
666
+ import matplotlib.pyplot as plt
667
+
668
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
669
+ df = df[(df['Country'] == 'Germany') & (df['Sales'] > 1159)]
670
+
671
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
672
+ plt.xlabel('Sales Value')
673
+ plt.ylabel('Frequency')
674
+ plt.legend()
675
+ plt.show()
676
+ "
677
+ Compare shipping modes by total sales for 'Brazil' in 2015 and plot the results.,"
678
+ import pandas as pd
679
+ import matplotlib.pyplot as plt
680
+
681
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
682
+ df_filtered = df[(df['Country'] == 'Brazil') & (df['Order Date'].str.contains('2015'))]
683
+ ship_sales = df_filtered.groupby('Ship Mode')['Sales'].sum()
684
+
685
+ ship_sales.plot(kind='bar', title='Sales by Shipping Mode in Brazil (2015)')
686
+ plt.ylabel('Total Sales')
687
+ plt.xlabel('Shipping Mode')
688
+ plt.show()
689
+ "
690
+ "Get all orders from 'Canada' where sales are greater than 1796, and plot the sales distribution.","
691
+ import pandas as pd
692
+ import matplotlib.pyplot as plt
693
+
694
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
695
+ df = df[(df['Country'] == 'Canada') & (df['Sales'] > 1796)]
696
+
697
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
698
+ plt.xlabel('Sales Value')
699
+ plt.ylabel('Frequency')
700
+ plt.legend()
701
+ plt.show()
702
+ "
703
+ "Get all orders from 'France' where sales are greater than 511, and plot the sales distribution.","
704
+ import pandas as pd
705
+ import matplotlib.pyplot as plt
706
+
707
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
708
+ df = df[(df['Country'] == 'France') & (df['Sales'] > 511)]
709
+
710
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
711
+ plt.xlabel('Sales Value')
712
+ plt.ylabel('Frequency')
713
+ plt.legend()
714
+ plt.show()
715
+ "
716
+ "Get all orders from 'United States' where sales are greater than 799, and plot the sales distribution.","
717
+ import pandas as pd
718
+ import matplotlib.pyplot as plt
719
+
720
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
721
+ df = df[(df['Country'] == 'United States') & (df['Sales'] > 799)]
722
+
723
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
724
+ plt.xlabel('Sales Value')
725
+ plt.ylabel('Frequency')
726
+ plt.legend()
727
+ plt.show()
728
+ "
729
+ "Get all orders from 'Australia' where sales are greater than 1156, and plot the sales distribution.","
730
+ import pandas as pd
731
+ import matplotlib.pyplot as plt
732
+
733
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
734
+ df = df[(df['Country'] == 'Australia') & (df['Sales'] > 1156)]
735
+
736
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
737
+ plt.xlabel('Sales Value')
738
+ plt.ylabel('Frequency')
739
+ plt.legend()
740
+ plt.show()
741
+ "
742
+ "Get all orders from 'Canada' where sales are greater than 788, and plot the sales distribution.","
743
+ import pandas as pd
744
+ import matplotlib.pyplot as plt
745
+
746
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
747
+ df = df[(df['Country'] == 'Canada') & (df['Sales'] > 788)]
748
+
749
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
750
+ plt.xlabel('Sales Value')
751
+ plt.ylabel('Frequency')
752
+ plt.legend()
753
+ plt.show()
754
+ "
755
+ Compare shipping modes by total sales for 'Germany' in 2016 and plot the results.,"
756
+ import pandas as pd
757
+ import matplotlib.pyplot as plt
758
+
759
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
760
+ df_filtered = df[(df['Country'] == 'Germany') & (df['Order Date'].str.contains('2016'))]
761
+ ship_sales = df_filtered.groupby('Ship Mode')['Sales'].sum()
762
+
763
+ ship_sales.plot(kind='bar', title='Sales by Shipping Mode in Germany (2016)')
764
+ plt.ylabel('Total Sales')
765
+ plt.xlabel('Shipping Mode')
766
+ plt.show()
767
+ "
768
+ "Get all orders from 'Canada' where sales are greater than 1600, and plot the sales distribution.","
769
+ import pandas as pd
770
+ import matplotlib.pyplot as plt
771
+
772
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
773
+ df = df[(df['Country'] == 'Canada') & (df['Sales'] > 1600)]
774
+
775
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
776
+ plt.xlabel('Sales Value')
777
+ plt.ylabel('Frequency')
778
+ plt.legend()
779
+ plt.show()
780
+ "
781
+ "Get all orders from 'Brazil' where sales are greater than 1121, and plot the sales distribution.","
782
+ import pandas as pd
783
+ import matplotlib.pyplot as plt
784
+
785
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
786
+ df = df[(df['Country'] == 'Brazil') & (df['Sales'] > 1121)]
787
+
788
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
789
+ plt.xlabel('Sales Value')
790
+ plt.ylabel('Frequency')
791
+ plt.legend()
792
+ plt.show()
793
+ "
794
+ Compare shipping modes by total sales for 'Germany' in 2017 and plot the results.,"
795
+ import pandas as pd
796
+ import matplotlib.pyplot as plt
797
+
798
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
799
+ df_filtered = df[(df['Country'] == 'Germany') & (df['Order Date'].str.contains('2017'))]
800
+ ship_sales = df_filtered.groupby('Ship Mode')['Sales'].sum()
801
+
802
+ ship_sales.plot(kind='bar', title='Sales by Shipping Mode in Germany (2017)')
803
+ plt.ylabel('Total Sales')
804
+ plt.xlabel('Shipping Mode')
805
+ plt.show()
806
+ "
807
+ "Get all orders from 'India' where sales are greater than 1106, and plot the sales distribution.","
808
+ import pandas as pd
809
+ import matplotlib.pyplot as plt
810
+
811
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
812
+ df = df[(df['Country'] == 'India') & (df['Sales'] > 1106)]
813
+
814
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
815
+ plt.xlabel('Sales Value')
816
+ plt.ylabel('Frequency')
817
+ plt.legend()
818
+ plt.show()
819
+ "
820
+ "Get all orders from 'Saudi Arabia' where sales are greater than 1805, and plot the sales distribution.","
821
+ import pandas as pd
822
+ import matplotlib.pyplot as plt
823
+
824
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
825
+ df = df[(df['Country'] == 'Saudi Arabia') & (df['Sales'] > 1805)]
826
+
827
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
828
+ plt.xlabel('Sales Value')
829
+ plt.ylabel('Frequency')
830
+ plt.legend()
831
+ plt.show()
832
+ "
833
+ "Get all orders from 'Saudi Arabia' where sales are greater than 1622, and plot the sales distribution.","
834
+ import pandas as pd
835
+ import matplotlib.pyplot as plt
836
+
837
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
838
+ df = df[(df['Country'] == 'Saudi Arabia') & (df['Sales'] > 1622)]
839
+
840
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
841
+ plt.xlabel('Sales Value')
842
+ plt.ylabel('Frequency')
843
+ plt.legend()
844
+ plt.show()
845
+ "
846
+ Compare shipping modes by total sales for 'Brazil' in 2017 and plot the results.,"
847
+ import pandas as pd
848
+ import matplotlib.pyplot as plt
849
+
850
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
851
+ df_filtered = df[(df['Country'] == 'Brazil') & (df['Order Date'].str.contains('2017'))]
852
+ ship_sales = df_filtered.groupby('Ship Mode')['Sales'].sum()
853
+
854
+ ship_sales.plot(kind='bar', title='Sales by Shipping Mode in Brazil (2017)')
855
+ plt.ylabel('Total Sales')
856
+ plt.xlabel('Shipping Mode')
857
+ plt.show()
858
+ "
859
+ Compare shipping modes by total sales for 'Saudi Arabia' in 2017 and plot the results.,"
860
+ import pandas as pd
861
+ import matplotlib.pyplot as plt
862
+
863
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
864
+ df_filtered = df[(df['Country'] == 'Saudi Arabia') & (df['Order Date'].str.contains('2017'))]
865
+ ship_sales = df_filtered.groupby('Ship Mode')['Sales'].sum()
866
+
867
+ ship_sales.plot(kind='bar', title='Sales by Shipping Mode in Saudi Arabia (2017)')
868
+ plt.ylabel('Total Sales')
869
+ plt.xlabel('Shipping Mode')
870
+ plt.show()
871
+ "
872
+ Compare shipping modes by total sales for 'Saudi Arabia' in 2015 and plot the results.,"
873
+ import pandas as pd
874
+ import matplotlib.pyplot as plt
875
+
876
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
877
+ df_filtered = df[(df['Country'] == 'Saudi Arabia') & (df['Order Date'].str.contains('2015'))]
878
+ ship_sales = df_filtered.groupby('Ship Mode')['Sales'].sum()
879
+
880
+ ship_sales.plot(kind='bar', title='Sales by Shipping Mode in Saudi Arabia (2015)')
881
+ plt.ylabel('Total Sales')
882
+ plt.xlabel('Shipping Mode')
883
+ plt.show()
884
+ "
885
+ Compare shipping modes by total sales for 'Brazil' in 2016 and plot the results.,"
886
+ import pandas as pd
887
+ import matplotlib.pyplot as plt
888
+
889
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
890
+ df_filtered = df[(df['Country'] == 'Brazil') & (df['Order Date'].str.contains('2016'))]
891
+ ship_sales = df_filtered.groupby('Ship Mode')['Sales'].sum()
892
+
893
+ ship_sales.plot(kind='bar', title='Sales by Shipping Mode in Brazil (2016)')
894
+ plt.ylabel('Total Sales')
895
+ plt.xlabel('Shipping Mode')
896
+ plt.show()
897
+ "
898
+ "Get all orders from 'Brazil' where sales are greater than 905, and plot the sales distribution.","
899
+ import pandas as pd
900
+ import matplotlib.pyplot as plt
901
+
902
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
903
+ df = df[(df['Country'] == 'Brazil') & (df['Sales'] > 905)]
904
+
905
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
906
+ plt.xlabel('Sales Value')
907
+ plt.ylabel('Frequency')
908
+ plt.legend()
909
+ plt.show()
910
+ "
911
+ "Get all orders from 'Brazil' where sales are greater than 605, and plot the sales distribution.","
912
+ import pandas as pd
913
+ import matplotlib.pyplot as plt
914
+
915
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
916
+ df = df[(df['Country'] == 'Brazil') & (df['Sales'] > 605)]
917
+
918
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
919
+ plt.xlabel('Sales Value')
920
+ plt.ylabel('Frequency')
921
+ plt.legend()
922
+ plt.show()
923
+ "
924
+ "Get all orders from 'Germany' where sales are greater than 1875, and plot the sales distribution.","
925
+ import pandas as pd
926
+ import matplotlib.pyplot as plt
927
+
928
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
929
+ df = df[(df['Country'] == 'Germany') & (df['Sales'] > 1875)]
930
+
931
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
932
+ plt.xlabel('Sales Value')
933
+ plt.ylabel('Frequency')
934
+ plt.legend()
935
+ plt.show()
936
+ "
937
+ Identify the top 5 cities by total sales in 'Canada' and display a horizontal bar chart.,"
938
+ import pandas as pd
939
+ import matplotlib.pyplot as plt
940
+
941
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
942
+ top_cities = df[df['Country'] == 'Canada'].groupby('City')['Sales'].sum().nlargest(5)
943
+
944
+ top_cities.plot(kind='barh', title='Top 5 Cities by Sales in Canada')
945
+ plt.xlabel('Total Sales')
946
+ plt.ylabel('City')
947
+ plt.show()
948
+ "
949
+ "Get all orders from 'France' where sales are greater than 1008, and plot the sales distribution.","
950
+ import pandas as pd
951
+ import matplotlib.pyplot as plt
952
+
953
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
954
+ df = df[(df['Country'] == 'France') & (df['Sales'] > 1008)]
955
+
956
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
957
+ plt.xlabel('Sales Value')
958
+ plt.ylabel('Frequency')
959
+ plt.legend()
960
+ plt.show()
961
+ "
962
+ "Get all orders from 'Canada' where sales are greater than 1155, and plot the sales distribution.","
963
+ import pandas as pd
964
+ import matplotlib.pyplot as plt
965
+
966
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
967
+ df = df[(df['Country'] == 'Canada') & (df['Sales'] > 1155)]
968
+
969
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
970
+ plt.xlabel('Sales Value')
971
+ plt.ylabel('Frequency')
972
+ plt.legend()
973
+ plt.show()
974
+ "
975
+ Compare shipping modes by total sales for 'India' in 2017 and plot the results.,"
976
+ import pandas as pd
977
+ import matplotlib.pyplot as plt
978
+
979
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
980
+ df_filtered = df[(df['Country'] == 'India') & (df['Order Date'].str.contains('2017'))]
981
+ ship_sales = df_filtered.groupby('Ship Mode')['Sales'].sum()
982
+
983
+ ship_sales.plot(kind='bar', title='Sales by Shipping Mode in India (2017)')
984
+ plt.ylabel('Total Sales')
985
+ plt.xlabel('Shipping Mode')
986
+ plt.show()
987
+ "
988
+ "Get all orders from 'Saudi Arabia' where sales are greater than 1997, and plot the sales distribution.","
989
+ import pandas as pd
990
+ import matplotlib.pyplot as plt
991
+
992
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
993
+ df = df[(df['Country'] == 'Saudi Arabia') & (df['Sales'] > 1997)]
994
+
995
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
996
+ plt.xlabel('Sales Value')
997
+ plt.ylabel('Frequency')
998
+ plt.legend()
999
+ plt.show()
1000
+ "
1001
+ "Get all orders from 'Brazil' where sales are greater than 1635, and plot the sales distribution.","
1002
+ import pandas as pd
1003
+ import matplotlib.pyplot as plt
1004
+
1005
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
1006
+ df = df[(df['Country'] == 'Brazil') & (df['Sales'] > 1635)]
1007
+
1008
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
1009
+ plt.xlabel('Sales Value')
1010
+ plt.ylabel('Frequency')
1011
+ plt.legend()
1012
+ plt.show()
1013
+ "
1014
+ "Get all orders from 'Canada' where sales are greater than 1670, and plot the sales distribution.","
1015
+ import pandas as pd
1016
+ import matplotlib.pyplot as plt
1017
+
1018
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
1019
+ df = df[(df['Country'] == 'Canada') & (df['Sales'] > 1670)]
1020
+
1021
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
1022
+ plt.xlabel('Sales Value')
1023
+ plt.ylabel('Frequency')
1024
+ plt.legend()
1025
+ plt.show()
1026
+ "
1027
+ Compare shipping modes by total sales for 'India' in 2015 and plot the results.,"
1028
+ import pandas as pd
1029
+ import matplotlib.pyplot as plt
1030
+
1031
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
1032
+ df_filtered = df[(df['Country'] == 'India') & (df['Order Date'].str.contains('2015'))]
1033
+ ship_sales = df_filtered.groupby('Ship Mode')['Sales'].sum()
1034
+
1035
+ ship_sales.plot(kind='bar', title='Sales by Shipping Mode in India (2015)')
1036
+ plt.ylabel('Total Sales')
1037
+ plt.xlabel('Shipping Mode')
1038
+ plt.show()
1039
+ "
1040
+ "Get all orders from 'United States' where sales are greater than 1338, and plot the sales distribution.","
1041
+ import pandas as pd
1042
+ import matplotlib.pyplot as plt
1043
+
1044
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
1045
+ df = df[(df['Country'] == 'United States') & (df['Sales'] > 1338)]
1046
+
1047
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
1048
+ plt.xlabel('Sales Value')
1049
+ plt.ylabel('Frequency')
1050
+ plt.legend()
1051
+ plt.show()
1052
+ "
1053
+ "Get all orders from 'United States' where sales are greater than 1860, and plot the sales distribution.","
1054
+ import pandas as pd
1055
+ import matplotlib.pyplot as plt
1056
+
1057
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
1058
+ df = df[(df['Country'] == 'United States') & (df['Sales'] > 1860)]
1059
+
1060
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
1061
+ plt.xlabel('Sales Value')
1062
+ plt.ylabel('Frequency')
1063
+ plt.legend()
1064
+ plt.show()
1065
+ "
1066
+ "Get all orders from 'Saudi Arabia' where sales are greater than 1721, and plot the sales distribution.","
1067
+ import pandas as pd
1068
+ import matplotlib.pyplot as plt
1069
+
1070
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
1071
+ df = df[(df['Country'] == 'Saudi Arabia') & (df['Sales'] > 1721)]
1072
+
1073
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
1074
+ plt.xlabel('Sales Value')
1075
+ plt.ylabel('Frequency')
1076
+ plt.legend()
1077
+ plt.show()
1078
+ "
1079
+ Identify the top 5 cities by total sales in 'France' and display a horizontal bar chart.,"
1080
+ import pandas as pd
1081
+ import matplotlib.pyplot as plt
1082
+
1083
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
1084
+ top_cities = df[df['Country'] == 'France'].groupby('City')['Sales'].sum().nlargest(5)
1085
+
1086
+ top_cities.plot(kind='barh', title='Top 5 Cities by Sales in France')
1087
+ plt.xlabel('Total Sales')
1088
+ plt.ylabel('City')
1089
+ plt.show()
1090
+ "
1091
+ "Get all orders from 'India' where sales are greater than 736, and plot the sales distribution.","
1092
+ import pandas as pd
1093
+ import matplotlib.pyplot as plt
1094
+
1095
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
1096
+ df = df[(df['Country'] == 'India') & (df['Sales'] > 736)]
1097
+
1098
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
1099
+ plt.xlabel('Sales Value')
1100
+ plt.ylabel('Frequency')
1101
+ plt.legend()
1102
+ plt.show()
1103
+ "
1104
+ "Get all orders from 'United States' where sales are greater than 808, and plot the sales distribution.","
1105
+ import pandas as pd
1106
+ import matplotlib.pyplot as plt
1107
+
1108
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
1109
+ df = df[(df['Country'] == 'United States') & (df['Sales'] > 808)]
1110
+
1111
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
1112
+ plt.xlabel('Sales Value')
1113
+ plt.ylabel('Frequency')
1114
+ plt.legend()
1115
+ plt.show()
1116
+ "
1117
+ "Get all orders from 'France' where sales are greater than 1580, and plot the sales distribution.","
1118
+ import pandas as pd
1119
+ import matplotlib.pyplot as plt
1120
+
1121
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
1122
+ df = df[(df['Country'] == 'France') & (df['Sales'] > 1580)]
1123
+
1124
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
1125
+ plt.xlabel('Sales Value')
1126
+ plt.ylabel('Frequency')
1127
+ plt.legend()
1128
+ plt.show()
1129
+ "
1130
+ Compare shipping modes by total sales for 'Australia' in 2017 and plot the results.,"
1131
+ import pandas as pd
1132
+ import matplotlib.pyplot as plt
1133
+
1134
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
1135
+ df_filtered = df[(df['Country'] == 'Australia') & (df['Order Date'].str.contains('2017'))]
1136
+ ship_sales = df_filtered.groupby('Ship Mode')['Sales'].sum()
1137
+
1138
+ ship_sales.plot(kind='bar', title='Sales by Shipping Mode in Australia (2017)')
1139
+ plt.ylabel('Total Sales')
1140
+ plt.xlabel('Shipping Mode')
1141
+ plt.show()
1142
+ "
1143
+ Compare shipping modes by total sales for 'Canada' in 2014 and plot the results.,"
1144
+ import pandas as pd
1145
+ import matplotlib.pyplot as plt
1146
+
1147
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
1148
+ df_filtered = df[(df['Country'] == 'Canada') & (df['Order Date'].str.contains('2014'))]
1149
+ ship_sales = df_filtered.groupby('Ship Mode')['Sales'].sum()
1150
+
1151
+ ship_sales.plot(kind='bar', title='Sales by Shipping Mode in Canada (2014)')
1152
+ plt.ylabel('Total Sales')
1153
+ plt.xlabel('Shipping Mode')
1154
+ plt.show()
1155
+ "
1156
+ Compare shipping modes by total sales for 'France' in 2016 and plot the results.,"
1157
+ import pandas as pd
1158
+ import matplotlib.pyplot as plt
1159
+
1160
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
1161
+ df_filtered = df[(df['Country'] == 'France') & (df['Order Date'].str.contains('2016'))]
1162
+ ship_sales = df_filtered.groupby('Ship Mode')['Sales'].sum()
1163
+
1164
+ ship_sales.plot(kind='bar', title='Sales by Shipping Mode in France (2016)')
1165
+ plt.ylabel('Total Sales')
1166
+ plt.xlabel('Shipping Mode')
1167
+ plt.show()
1168
+ "
1169
+ "Get all orders from 'Germany' where sales are greater than 1507, and plot the sales distribution.","
1170
+ import pandas as pd
1171
+ import matplotlib.pyplot as plt
1172
+
1173
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
1174
+ df = df[(df['Country'] == 'Germany') & (df['Sales'] > 1507)]
1175
+
1176
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
1177
+ plt.xlabel('Sales Value')
1178
+ plt.ylabel('Frequency')
1179
+ plt.legend()
1180
+ plt.show()
1181
+ "
1182
+ Compare shipping modes by total sales for 'United States' in 2014 and plot the results.,"
1183
+ import pandas as pd
1184
+ import matplotlib.pyplot as plt
1185
+
1186
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
1187
+ df_filtered = df[(df['Country'] == 'United States') & (df['Order Date'].str.contains('2014'))]
1188
+ ship_sales = df_filtered.groupby('Ship Mode')['Sales'].sum()
1189
+
1190
+ ship_sales.plot(kind='bar', title='Sales by Shipping Mode in United States (2014)')
1191
+ plt.ylabel('Total Sales')
1192
+ plt.xlabel('Shipping Mode')
1193
+ plt.show()
1194
+ "
1195
+ Compare shipping modes by total sales for 'Canada' in 2017 and plot the results.,"
1196
+ import pandas as pd
1197
+ import matplotlib.pyplot as plt
1198
+
1199
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
1200
+ df_filtered = df[(df['Country'] == 'Canada') & (df['Order Date'].str.contains('2017'))]
1201
+ ship_sales = df_filtered.groupby('Ship Mode')['Sales'].sum()
1202
+
1203
+ ship_sales.plot(kind='bar', title='Sales by Shipping Mode in Canada (2017)')
1204
+ plt.ylabel('Total Sales')
1205
+ plt.xlabel('Shipping Mode')
1206
+ plt.show()
1207
+ "
1208
+ "Get all orders from 'France' where sales are greater than 1791, and plot the sales distribution.","
1209
+ import pandas as pd
1210
+ import matplotlib.pyplot as plt
1211
+
1212
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
1213
+ df = df[(df['Country'] == 'France') & (df['Sales'] > 1791)]
1214
+
1215
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
1216
+ plt.xlabel('Sales Value')
1217
+ plt.ylabel('Frequency')
1218
+ plt.legend()
1219
+ plt.show()
1220
+ "
1221
+ "Get all orders from 'Brazil' where sales are greater than 1298, and plot the sales distribution.","
1222
+ import pandas as pd
1223
+ import matplotlib.pyplot as plt
1224
+
1225
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
1226
+ df = df[(df['Country'] == 'Brazil') & (df['Sales'] > 1298)]
1227
+
1228
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
1229
+ plt.xlabel('Sales Value')
1230
+ plt.ylabel('Frequency')
1231
+ plt.legend()
1232
+ plt.show()
1233
+ "
1234
+ "Get all orders from 'India' where sales are greater than 798, and plot the sales distribution.","
1235
+ import pandas as pd
1236
+ import matplotlib.pyplot as plt
1237
+
1238
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
1239
+ df = df[(df['Country'] == 'India') & (df['Sales'] > 798)]
1240
+
1241
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
1242
+ plt.xlabel('Sales Value')
1243
+ plt.ylabel('Frequency')
1244
+ plt.legend()
1245
+ plt.show()
1246
+ "
1247
+ "Get all orders from 'Saudi Arabia' where sales are greater than 1540, and plot the sales distribution.","
1248
+ import pandas as pd
1249
+ import matplotlib.pyplot as plt
1250
+
1251
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
1252
+ df = df[(df['Country'] == 'Saudi Arabia') & (df['Sales'] > 1540)]
1253
+
1254
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
1255
+ plt.xlabel('Sales Value')
1256
+ plt.ylabel('Frequency')
1257
+ plt.legend()
1258
+ plt.show()
1259
+ "
1260
+ "Get all orders from 'Brazil' where sales are greater than 1908, and plot the sales distribution.","
1261
+ import pandas as pd
1262
+ import matplotlib.pyplot as plt
1263
+
1264
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
1265
+ df = df[(df['Country'] == 'Brazil') & (df['Sales'] > 1908)]
1266
+
1267
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
1268
+ plt.xlabel('Sales Value')
1269
+ plt.ylabel('Frequency')
1270
+ plt.legend()
1271
+ plt.show()
1272
+ "
1273
+ "Get all orders from 'Canada' where sales are greater than 1220, and plot the sales distribution.","
1274
+ import pandas as pd
1275
+ import matplotlib.pyplot as plt
1276
+
1277
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
1278
+ df = df[(df['Country'] == 'Canada') & (df['Sales'] > 1220)]
1279
+
1280
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
1281
+ plt.xlabel('Sales Value')
1282
+ plt.ylabel('Frequency')
1283
+ plt.legend()
1284
+ plt.show()
1285
+ "
1286
+ "Get all orders from 'Australia' where sales are greater than 1408, and plot the sales distribution.","
1287
+ import pandas as pd
1288
+ import matplotlib.pyplot as plt
1289
+
1290
+ df = pd.read_csv('/content/global-super-store-dataset/Global_Superstore2.csv', encoding='ISO-8859-1')
1291
+ df = df[(df['Country'] == 'Australia') & (df['Sales'] > 1408)]
1292
+
1293
+ plt.hist(df['Sales'], bins=20, alpha=0.5, label='Sales Distribution')
1294
+ plt.xlabel('Sales Value')
1295
+ plt.ylabel('Frequency')
1296
+ plt.legend()
1297
+ plt.show()
1298
+ "