Tag: pandas
-
Find common genes from two conditions with their expression values using pandas merge method
Let’s say we have two pandas dataframes. Each of them contain two columns, the gene name and their expression value. There may be other columns with more details of each gene but for simplicity we will consider only two columns. This may be expression data from two growth condition of culture, or two treatment groups…
-
OneHot encoding of columns in a pandas dataframe using get_dummies.
The simplest way I found for performing OneHot encoding is using pandas.get_dummies method. In just one line of code you can OneHot encode selected columns in a pandas dataframe. Also, it returns the dataframe with other columns intact. The renaming of new columns of the encoded data is taken care off too. Let’s start by…