Tag Archives: pandas

corrplot function in Python

We’ve implemented a corrplot function in Python, which is available in BioKit package – github https://github.com/biokit/biokit – pypi https://pypi.python.org/pypi/biokit For illustration, let us create some random data sets: import pandas as pd import string letters = string.uppercase[0:15] df = pd.DataFrame(dict(( … Continue reading

Posted in Python | Tagged , , , | 4 Comments

Pandas : how to compare dataframe with None

While comparing a pandas dataframe with None, import pandas as pd df = pd.DataFrame() # Note that the dataframe is empty but it does not matter for this example. if df == None: pass # do nothing else: df.describe()import pandas … Continue reading

Posted in Python | Tagged | Leave a comment

pandas.read_csv: how to skip empty lines

Let us suppose that we start with a CSV file that has empty rows: A, B, C   1, 2, 3A, B, C 1, 2, 3 If you read this file with Pandas library, and look at the content of … Continue reading

Posted in Python | Tagged | 2 Comments

Pandas dataframe: grouping column by name

Let us consider this data set in CSV format: DIG1, DIG1, DIG1, DIG2 1, 3, 5, 8 2, 4, 6, 9 3, 5, 7, 10DIG1, DIG1, DIG1, DIG2 1, 3, 5, 8 2, 4, 6, 9 3, 5, 7, 10 … Continue reading

Posted in Python | Tagged | 5 Comments

Starting to use Python Pandas library

Pandas is brilliant. If you are looking to manipulate data in Python, use it. I am refactoring most of my codes with this library. It provides many useful data structures to manipulate data in 2, 3, 4 dimensions and more. … Continue reading

Posted in Python | Tagged , | Leave a comment

pandas import fails with ImportError: cannot import name hashtable

Import of pandas raises the following error: ImportError: cannot import name hashtableImportError: cannot import name hashtable Starting a python session, I typed from pandas import hastablefrom pandas import hastable and got this new message: ImportError: cannot import name hashtableImportError: cannot … Continue reading

Posted in Python | Tagged | Leave a comment