Forum Discussion
Best practice to fill one column with manipulated values from another (DataFrame)?
- May 04, 2022
chrisxfire not sure if this is what you were looking for, but you might be able to use the Apply function to take the values from one column, manipulate them, and save them to another column. Here's an example of that:
Alternatively, using the same data as above, you could also do the following which produces the same result:
I believe that the `Apply` method is implemented on PrimitiveDataFrameColumn, but not DataFrameColumn which is why you can't call it directly from `df["Numbers"]`
chrisxfire not sure if this is what you were looking for, but you might be able to use the Apply function to take the values from one column, manipulate them, and save them to another column. Here's an example of that:
Alternatively, using the same data as above, you could also do the following which produces the same result:
I believe that the `Apply` method is implemented on PrimitiveDataFrameColumn, but not DataFrameColumn which is why you can't call it directly from `df["Numbers"]`
- chrisxfireMay 05, 2022Copper ContributorThis is very helpful Luis, thank you.
May I ask what code editor you are using in those screenshots?- LuisQuintanillaMay 05, 2022
Microsoft
I'm in Visual Studio using the Notebook Editor extension. Feel free to check it out and give us feedback! 🙂
https://marketplace.visualstudio.com/items?itemName=MLNET.notebook- chrisxfireMay 05, 2022Copper ContributorAh, this brings me back to my Python days! Installing now... thanks!