diff --git a/.mapper.py.swp b/.mapper.py.swp new file mode 100644 index 0000000..e7a5ed4 Binary files /dev/null and b/.mapper.py.swp differ diff --git a/.output.txt.crc b/.output.txt.crc new file mode 100644 index 0000000..668b8eb Binary files /dev/null and b/.output.txt.crc differ diff --git a/README.md b/README.md new file mode 100644 index 0000000..dfa704f --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# mapreduceexercise +# mapreduceexercise +# mapreduceexercise diff --git a/mapper.py b/mapper.py index 4645285..e0d701c 100755 --- a/mapper.py +++ b/mapper.py @@ -41,4 +41,4 @@ # Key is the payment, value is the sales # With a tab (\t) between key and value # New line \n means new record - sys.stdout.write("{0}\t{1}\n".format(payment, sales)) + sys.stdout.write("{0}\t{1}\n".format(category, sales)) diff --git a/output.txt b/output.txt new file mode 100644 index 0000000..0adbd11 --- /dev/null +++ b/output.txt @@ -0,0 +1,5 @@ +Amex 93479.83 +Visa 105558.2 +Discover 97172.73 +MasterCard 94885.53 +Cash 100726.37 diff --git a/result.txt b/result.txt new file mode 100644 index 0000000..bf96ccd --- /dev/null +++ b/result.txt @@ -0,0 +1,5 @@ +Amex 93479.83 +Cash 100726.37 +Discover 97172.73 +MasterCard 94885.53 +Visa 105558.2 diff --git a/result1.txt b/result1.txt new file mode 100644 index 0000000..7698392 --- /dev/null +++ b/result1.txt @@ -0,0 +1,18 @@ +Baby 23173.67 +Books 27262.16 +Cameras 27228.21 +CDs 23380.68 +Children's Clothing 28507.82 +Computers 28330.62 +Consumer Electronics 27399.24 +Crafts 28115.25 +DVDs 29300.75 +Garden 28384.5 +Health and Beauty 23024.9 +Men's Clothing 29814.55 +Music 31449.59 +Pet Supplies 27359.5 +Sporting Goods 27723.72 +Toys 27382.74 +Video Games 29817.37 +Women's Clothing 24167.39