Y
Hacker News
new
|
ask
|
show
|
jobs
by
hubot
3405 days ago
can someone explain what's the meaning of this line
> df['y'] = np.log(df['y'])
2 comments
llimllib
3405 days ago
I have not read the code, but assuming df is a pandas dataframe, it sets the 'y' column to the log of what was previously the 'y' column.
https://gist.github.com/llimllib/385230f38c3f9b70c3e46158e60...
link
slashcom
3405 days ago
df is a dataframe, which is like a spreadsheet. This line takes the logarithm of the column named 'y' and updates it in place.
link
hubot
3405 days ago
thanks. that part i can understand but why do that?
link
https://gist.github.com/llimllib/385230f38c3f9b70c3e46158e60...