Often you may want to create a new variable either from column names of a pandas data frame or from one of the columns of the data frame. Just like Python, Pandas has great string manipulation abilities that lets you manipulate strings easily. Let us see an example of using Pandas to manipulate column names […]
Plotnine: A Python library to use ggplot2 in Python
Python’s visualization options can be difficult to grasp, if you recently moved to use Python after using R for a while. There are a lot of options. Multiple options for visualizations are good. Especially, mature matplotlib, Seaborn, Bokeh and the new library like Altair are great to learn and use for data visualization in Python. […]
How To Loop Through Lines in a File in Bash?
Often you may want to loop through each line from a file and do something to each line. Yes, you can use Python or other programming language to do that. However, a simple bash script can be extremely useful in looping through lines in a file. Here is how to loop through lines in a […]
f-string in Python 3.6 for formatting strings
If you are new to Python 3, learning to use f-string, Python’s relatively new string formatting is a lot of fun. f-string, a short name for “formatted string literal”, is a string literal that is prefixed with letter ‘f’ or ‘F’ and is available from Python version 3.6 There are multiple options to format a […]
An Introduction to Altair: A Python Visualization Library
Altair is kind of the new kid in the data visualization block. Altair is declarative visualization library that uses grammar of interactive graphics, built on Vega and Vega-lite. Vega-Lite enables concise descriptions of visualizations as a set of encodings that map data fields to the properties of graphical marks. Altair API kind of works as […]



