Forum Discussion
chrisxfire
Apr 27, 2022Copper Contributor
Best practice to fill one column with manipulated values from another (DataFrame)?
C# 10 / .NET 6 / Microsoft.Data.Analysis Given a Microsoft.Data.Analysis DataFrame with two columns, what is the idiomatic way to take values from one column, manipulate them, then use the ...
- 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
May 05, 2022Copper Contributor
This is very helpful Luis, thank you.
May I ask what code editor you are using in those screenshots?
May I ask what code editor you are using in those screenshots?
LuisQuintanilla
Microsoft
May 05, 2022I'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
https://marketplace.visualstudio.com/items?itemName=MLNET.notebook
- chrisxfireMay 05, 2022Copper ContributorAh, this brings me back to my Python days! Installing now... thanks!