Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: DataFrame Calculation
Post: RE: DataFrame Calculation

So just to get to your sample, you can use the below line without a loop should suffice: df["c"] = (df["b"] - df["a"]) / df["a"]You can also assign the result to a new dataframe: newDF = (df["b"] - df...
SamSoftwareLtd Data Science 2 3,712 Nov-22-2018, 12:10 AM
    Thread: DataFrame Calculation
Post: RE: DataFrame Calculation

Hi Ian, How about the simple assignment line below: df['e']=[9,8,7,6,5,4] dfOut[67]: a b e 0 11 15 9 1 12 20 8 2 13 30 7 3 14 20 6 4 15 30 5 5 16 50 4 your case above seems...
SamSoftwareLtd Data Science 2 3,712 Nov-21-2018, 05:38 PM
    Thread: DataFrame simple calculation
Post: DataFrame simple calculation

Hi, I'm unsure if this is a normal or strange result I'm getting in the below simple DataFrame contains 5 elements of floats stock prices, with their Date as the index, if I apply plus operator, the ...
SamSoftwareLtd General Coding Help 0 1,669 Nov-21-2018, 12:50 PM
    Thread: 'list' object has no attribute 'reshape'
Post: 'list' object has no attribute 'reshape'

Hi All, I've just joined this forum, also new to Python, with background in other languages. I've been trying a small piece of code below using jupyter ipython in notebooks.azure.com, the error is c...
SamSoftwareLtd Data Science 1 15,578 Nov-04-2018, 10:03 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020