Company also likes to find out the total purchase amount and the number of transactions made by each customer in their lifetime Create new data frame called "new-dataset", containing the columns ['CustomerID', TotalPurchaseAmount', NumberofTransactions']. Display the last 10 rows. Expected output is as follows:

COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
1st Edition
ISBN:9780357392676
Author:FREUND, Steven
Publisher:FREUND, Steven
Chapter8: Working With Trendlines, Pivottables, Pivotcharts, And Slicers
Section: Chapter Questions
Problem 8EYW
icon
Related questions
icon
Concept explainers
Question
Task-6:
Company also likes to find out the total purchase amount and the number of
transactions made by each customer in their lifetime
Create new data frame called "new-dataset", containing the columns
['CustomerlD', TotalPurchaseAmount', NumberofTransactions']. Display the
last 10 rows. Expected output is as follows:
CustomeriD TotalPurchaseAmount NumberofTransactions
6
15100
350.40
7
15291
328.80
15311
454.63
36
16029
3702.12
8
10
16098
430.60
12
11
16250
226.14
14
12
17420
130.85
7
13
17809
34.80
1
14
17850
725.44
45
15
18074
489.60
13
Transcribed Image Text:Task-6: Company also likes to find out the total purchase amount and the number of transactions made by each customer in their lifetime Create new data frame called "new-dataset", containing the columns ['CustomerlD', TotalPurchaseAmount', NumberofTransactions']. Display the last 10 rows. Expected output is as follows: CustomeriD TotalPurchaseAmount NumberofTransactions 6 15100 350.40 7 15291 328.80 15311 454.63 36 16029 3702.12 8 10 16098 430.60 12 11 16250 226.14 14 12 17420 130.85 7 13 17809 34.80 1 14 17850 725.44 45 15 18074 489.60 13
In (45):
1 Datal.head (200)
Out[45]:
InvoloeNo stookCode
Desoription Guantity
InvoloeDate UnitPrioe Cuctomerio
Country
536365
85123A
WHITE HANGING HEART T-LIGHT HOLDER
01/12/2010 826
2.55
17850.0 Untad Kingdom
536365
71063
WHITE METAL LANTERN
O1/12/2010 826
3.39
17850.0 United Kingdom
2
53636G
844068
CREAM CUPID HEARTS COAT HANGER
01/12/2010 826
2.75
17850.0 Unted Kingdom
536365
84029G KNITTED UNION FLAG HOT WATER BOTTLE
01/12/2010 8:26
3.39
17850.0 Untad Kingdom
4
536365
84029E
RED WOOLLY HOTTIE WHITE HEART.
01/12/2010 826
3.39
17800.0 United Kingdom
186
536388
22469
HEART OF WICKER SMALL
12 01/12/2010 9.50
1.65
16250.0 Unted Kingdom
188
536388
22242
5 HOCK HANGER MAGIC TOADSTOOL
12 01/12/2010 9.59
1.65
16250.0 Unted Kingdom
187
536389
22941
CHRISTMAS LIGHTS 10 REINDEER
6 01/12/2010 10:03
8.50
12431.0
Australia
188
536389
21622
VINTAGE UNION JACK CUSHION COVER
8 O112/2010 10.03
4.95
12431.0
Australia
188
536389
21701
VINTAGE HEADS AND TAILS CARD GAME
12 01/12/2010 10:03
1.25
12431.0
Australia
200 rows x 8 columns
In (49):
1 Datal.tail(200)
Out[49]:
InvoloeNo atookCode
Decoription Quantity
InvolceDate UnitPrioe Cuctomerio
Country
641700
581667
22625
RED KITCHEN SCALES
2 0812/2011 11.56
8.50
16626.0 Unted Kingdom
641710
581067
23356
HOT WATER BOTTLE KEEP CALM
4 O9122011 11:06
4.95
16626.0 Unted Kingdom
641711
581567
21326 AGED GLASS SILVER T-LIGHT HOLDER
144 09/122011 11.56
0.55
16626.0 Unted Kingdom
641712
581567
21479
WHITE SKULL HOT WATER BOTTLE
4 O9122011 11:56
4.25
16626.0 Unted Kingdom
641713
581567
23356
LOVE HOT WATER BOTTLE
3 Ce122011 11.56
5.95
16626.0 United Kingdom
641B04
581587
22613
PACK OF 20 SPACEBOY NAPKINS
12 D9/122011 12:50
O.85
12680.0
France
641805
581587
22899
CHLDRENS APRON DOLLY GIRL
6 D9/122011 12.50
2.10
12680.0
France
641808
581587
23254
CHILDRENS CUTLERY DOLLY GIRL
4 Da/122011 12.50
4.15
12680.0
France
641807
5815I7
23256 CHILDRENS CUTLERY CIRCUS PARADE
4 D9/122011 12:50
4.15
12680.0
France
641803
581587
22138
BAKING SET 9 PIECE RETROSPOT
3 D/122011 12.50
4.95
12680.0
France
200 rows x 8 columns
Transcribed Image Text:In (45): 1 Datal.head (200) Out[45]: InvoloeNo stookCode Desoription Guantity InvoloeDate UnitPrioe Cuctomerio Country 536365 85123A WHITE HANGING HEART T-LIGHT HOLDER 01/12/2010 826 2.55 17850.0 Untad Kingdom 536365 71063 WHITE METAL LANTERN O1/12/2010 826 3.39 17850.0 United Kingdom 2 53636G 844068 CREAM CUPID HEARTS COAT HANGER 01/12/2010 826 2.75 17850.0 Unted Kingdom 536365 84029G KNITTED UNION FLAG HOT WATER BOTTLE 01/12/2010 8:26 3.39 17850.0 Untad Kingdom 4 536365 84029E RED WOOLLY HOTTIE WHITE HEART. 01/12/2010 826 3.39 17800.0 United Kingdom 186 536388 22469 HEART OF WICKER SMALL 12 01/12/2010 9.50 1.65 16250.0 Unted Kingdom 188 536388 22242 5 HOCK HANGER MAGIC TOADSTOOL 12 01/12/2010 9.59 1.65 16250.0 Unted Kingdom 187 536389 22941 CHRISTMAS LIGHTS 10 REINDEER 6 01/12/2010 10:03 8.50 12431.0 Australia 188 536389 21622 VINTAGE UNION JACK CUSHION COVER 8 O112/2010 10.03 4.95 12431.0 Australia 188 536389 21701 VINTAGE HEADS AND TAILS CARD GAME 12 01/12/2010 10:03 1.25 12431.0 Australia 200 rows x 8 columns In (49): 1 Datal.tail(200) Out[49]: InvoloeNo atookCode Decoription Quantity InvolceDate UnitPrioe Cuctomerio Country 641700 581667 22625 RED KITCHEN SCALES 2 0812/2011 11.56 8.50 16626.0 Unted Kingdom 641710 581067 23356 HOT WATER BOTTLE KEEP CALM 4 O9122011 11:06 4.95 16626.0 Unted Kingdom 641711 581567 21326 AGED GLASS SILVER T-LIGHT HOLDER 144 09/122011 11.56 0.55 16626.0 Unted Kingdom 641712 581567 21479 WHITE SKULL HOT WATER BOTTLE 4 O9122011 11:56 4.25 16626.0 Unted Kingdom 641713 581567 23356 LOVE HOT WATER BOTTLE 3 Ce122011 11.56 5.95 16626.0 United Kingdom 641B04 581587 22613 PACK OF 20 SPACEBOY NAPKINS 12 D9/122011 12:50 O.85 12680.0 France 641805 581587 22899 CHLDRENS APRON DOLLY GIRL 6 D9/122011 12.50 2.10 12680.0 France 641808 581587 23254 CHILDRENS CUTLERY DOLLY GIRL 4 Da/122011 12.50 4.15 12680.0 France 641807 5815I7 23256 CHILDRENS CUTLERY CIRCUS PARADE 4 D9/122011 12:50 4.15 12680.0 France 641803 581587 22138 BAKING SET 9 PIECE RETROSPOT 3 D/122011 12.50 4.95 12680.0 France 200 rows x 8 columns
Expert Solution
steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Knowledge Booster
Query Syntax
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT