Category: Python

python @ Freshers.in

Python throwing as NameError: name ‘__file__’ is not defined – Solution

On Executing¬† os.path.dirname(os.path.realpath(__file__)) in python interactive shell, you will get the error NameError: name ‘__file__’ is not defined. This is…

How to convert xls to csv ? I can see first header column got shifted to next column- Solved

The requirement is to convert and xls to csv using python. Initially we used pandas ,¬† pandas.read_excel to read an…

Python-How to extract multiple words between two strings-(Extracting word between {})

Here we will see how to extract string between two specific character/string. This is a use case when you want…

How to transfer file from SFTP server to Local using Python

There are situation you may need to programmatically transfer file from SFTP server to you local environment. Here we will…

How to access hive using Python (Source code )

Use case : If you want to do some scheduling or some automation , we may need to access Hive…

Matplotlib Cheat Sheet for Quick reference

Matplotlib Matplotlib Cheat Sheet for Quick reference Matplotlib is a Python 2D plotting library which produces publication-quality figures in a…

NumPy Cheat Sheet for Quick reference

NumPy The NumPy library is the core library for scientific computing in Python. This Python NumPy cheat sheet is a…

Pandas Cheat Sheet for Quick reference

Syntax for Creating DataFrames Specify values for each column. a b c 1 4 7 10 2 5 8 11…