
Key/value concepts - RDDs can hold key/value pairs
RDDs can hold key/value pairs in addition to just single values. In our previous examples, we looked at RDDs that included lines of text for an input data file or that contained movie ratings. In those cases, every element of the RDD contained a single value, either a line of text or a movie rating, but you can also store more structured information in RDDs. There's a special case where you have a list of two items contained in an RDD and that is considered a key/value pair RDD. These are really useful things because once you start storing key/value pairs in an RDD, it looks a lot like a NoSQL database, it's just a giant key/value data store at that point. You can then do things where you can aggregate information by key/values for example, and that can come in handy for instance in this example we're about to do.