Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

find geomean of a df

# Computing geometric mean
# Storing into a DataFrame column
df['Geometric Mean'] = stats.gmean(df.iloc[:, 1:3], axis=1)
df
Comment

PREVIOUS NEXT
Code Example
Python :: could not find runder jupyter notebook 
Python :: qspinbox disable wheel python 
Python :: dopleganger 
Python :: what is nea in python 
Python :: detect stop codon 
Python :: changing instance through dict changes all instances 
Python :: fruit shop using list in python 
Python :: colorized progress bar python in console 
Python :: python folium add minimap to map 
Python :: python input with space 
Python :: how to set a timer in while loop python 
Python :: pandas get index of max value in column 
Python :: matplotlib transparency 
Python :: program to segregate positive and negative numbers in same list 
Python :: converting column data to sha256 pandas 
Python :: python popen no message 
Python :: what do i do if my dog eats paper 
Python :: iterating over 2d array python 
Python :: firefox selenium python 
Python :: combine date and time python 
Python :: label encoder pyspark 
Python :: selenium find element by link text python 
Python :: python pandas reading pickelt 
Python :: how to move file from one location to another with python 
Python :: remove duplicates from list python preserve order 
Python :: albert pretrained example 
Python :: edit line if str end with pandas 
Python :: remove 0 values from dataframe 
Python :: pandas replace empty strings with NaN 
Python :: how to save data to text file python 
ADD CONTENT
Topic
Content
Source link
Name
8+3 =