Skip to content

Tag: python

Filling column based on conditions

In the DataFrame below I am trying to update the Value column based on the following conditions, if Action is Sell check if the Status is not – if both the conditions are true then the first two characters of the Country needs to be updated as the Value column else if Status column is – and the Ac…

Python module not found even though its installed

Does anyone else have this issue? For reference check this screenshot: PIP is also up to date and I already tried reinstalling it but it didn’t work neither. I’m using VS Code. It also worked just fine yesterday but today it didn’t anymore for some reason. Answer Your mss package is installe…

How to compare differently transposed data in pandas or python

I am trying to compare or merge two different data sets and I am using pandas for that. The challenge that I am facing is that data is spread across rows in the first data set (Data1) and the other data set (Data2) has the same data spread across columns, below are the screenshots. Screenshot 1st – This…

How to write diagonal spaced print pattern in python [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 4 months ago. Improve this question if n=2 if n=3 This code i written for. But this code is half this only print row and column…