Software + Data + Cloud + AI

  • Counter vs Defaultdict

    Counter and defaultdict(int) are very similar, but they are designed for different purposes. Think of it like this: 1. defaultdict(int) Output Notice this: Output No KeyError. Without defaultdict: Output You would have to write or defaultdict removes this boilerplate. 2. Counter Output Looks almost identical. It also returns 0 for missing keys. 3. Biggest advantage…

  • Reading and Saving a File to DB using Spark

    Reading and storing in a file in Hive using

Join the Community

We’re thrilled to have you here! Now, if you don’t want to miss an article or an episode, you can subscribe to our newsletter.