pandas - Log values by SFrame column -
please, can tell me, how can take logarithm every value in sframe, graphlab (or dataframe, pandas) column, without iterate through whole length of sframe column? specially interest on similar functionality, groupby aggregators log-function. couldn't find someself...
important: please, don't interest for-loop
iteration whole length of column. interest specific function, transform all values log-values whole column.
i'm sorry, if function in manual. please, give me link...
numpy
provides implementations wide number of basic mathematical transformations. can use on data structures build on numpy's ndarray
.
import pandas pd import numpy np data = pd.series([np.exp(1), np.exp(2), np.exp(3)]) np.log(data)
outputs:
0 1 1 2 2 3 dtype: float64
this example pandas
data types, works data structures based on numpy
arrays.
Comments
Post a Comment