Posts

Working with Spark – Big Data Hadoop MapReduce

Image
Introduction Before moving to Spark RDD concept, which is the base line of Spark, we need to understand the concept of Hadoop Mapredue. RDD is the improvement of Hadoop Mapreduce to get 100 outputs in memory. In this blog post we are going to discuss about Hadoop Mapredue to understand the concept only. Hope it will be interesting.   What is MapReduce MapReduce is a software framework and programming module to handle huge data. Hadoop is capable to run MapReduce programs which are written in different language like Java, Ruby, Python and C++. How MapReduce Works As the name specified, MapReduce is a combination of Mapping and Reducing.   We can divide the MapReduc into following Sections. ·          Input Splits ·          Mapping ·          Shuffling ·          Reducing   Before exami...

Working with Python -- File Handling

Image
Introduction File Handling is a very important portion for any application. In Python, we have several function to Create, Read, Update and Delete file. In this blog post, we are trying to discuss about Python File handling. Hope it will be interesting. Open Function This is the key function to working with file. The Open function takes two parameters. One is File name and second is mode. "r"   -  Read   - Default value. Opens a file for reading, error if the file does not exist "a"  -  Append  - Opens a file for appending, creates the file if it does not exist "w"  -  Write  - Opens a file for writing, creates the file if it does not exist "x"  -  Create  - Creates the specified file, returns an error if the file exists In addition of that, we can specify that the file can be treated as Binary or as Text file. "t"  -  Text  - Default value. Text mode "b"  -  Binary  - Binary mode (e.g. images) Exa...

Working with Python – JSON

Image
Introduction JSON (Java Script Object Notation) is very popular nowadays for transmitting data. Here in this Blog Post we are going discuss about it. Hope it will be interesting.   Importing JSON module Before working with JSON, we have to import the JSON module in Python. import json Parsing JSON in Python We can Parse JSON in multiple ways in Python mentioned bellow. Parsing JSON to Dictionary We can Parse a JSON using json.loads() methods, which returns a Dictionary.   Example: Import   json person = '{"name": "Mayuree", "languages": ["English", "Bengali"]}' person_dict = json.loads(person) print( person_dict) print(person_dict['languages']) Output: {'name': 'Mayuree', 'languages': ['English', 'Bengali']} ['English', 'Bengali'] Here, person is a JSON string and person_dic is adictionary.     Read the JSON File   No...