Posts

Python Interview Questions

Hi Readers, Writing the post after a long time, was looking out for job opportunities. Facing around 10-15 interviews, I have experienced some of the common interview questions asked from a Python Developer and thought of creating a list of these questions. Will create a  separate post for answers as well. Here is the list of interview questions for python interviews: Which version of python have you worked with? What are MAGIC methods? What are DECORATORS? Write a decorator to add a '$' sign to a number. What are the different data types in python? What are mutable and immutable data types? Difference between list and tuples? Which one is faster to access list or a tuple and why? What is list comprehension? What is the use of negative indexing in the list? Why do we need list comprehension? How is it different from creating a list using a loop What are SETS in python? How are they different from LISTS? How SETS are internally stored in python? Which dat

Columnar Database-MonetDB

Image
Hey readers, recently I was exploring one of the databases offering  MonetDB which is a columnar database available open source. As per the documentation, the database has very high read performance and works very well with the data rollups. Apart from this it also supports transactions and other features of transactional databases. In this blog, I will be covering a few things that I learned while exploring the Database. Traditional Transactional DB NO SQL Databases Columnar Databases MonetDB Querying MonetDB using Python Transactional Databases: A decade ago the main purpose of databases was to store info and provide the information as and when required. The operations were mainly write heavy and information was stored in normalized form to avoid redundancy and maintain the integrity of information. The most popular OLTP databases that we have in the market and widely used are : Oracle SQL Server My SQL There are many other opensource as well as c

Pandas - DataFrame

Image
Data Frames In my previous blog , I talked about using the Series Data Structure in Pandas. Feel free to have a  look at that blog. This blog post will be a brief walkthrough of Data Frames. Data Frame is one of the most widely used tool in python by Data Scientists/Analyst. A DataFrame can be considered as a data table. Data Frame provides a wide range of functionality like filtering grouping sorting joins merging Let's start with creating a data frame In [7]: #importing pandas and DataFrame import pandas as pd from pandas import DataFrame #constructor to create a data frame #df=DataFrame( data, index, columns, dtype, copy) #Lists, dict, Series, Numpy ndarrays, Another DataFrame #creating an empty data frame df = DataFrame () #creating a data frame form an array df = DataFrame ([ 1 , 2 , 3 , 4 , 5 , 5 ]) print df 0 0 1 1 2 2 3 3 4 4 5 5 5 In [8]: #