This is just a Demo Dataset, I have a large dataset with millions of rows, I want to classify my shares as share bought and sold for every row, if the type is P it should be added in the column of bought and vice versa, similarly, if a row is empty it should just enter 0 in those two columns. Please suggest something without any loops as it's a pretty huge dataset. The Dataset is almost for millions of rows, so we need something proper which will be directly applicable for dataset.
Only For loop has been tried, but takes too much time.