Skip to content

Tag: python

How to find lines in pandas columns with close values?

I need to find ‘user_id’ of users standing closeby to each other. So we have data: So, in this dataset it would be users with id ‘101’ and ‘302’. But our dataset has millions of lines in it. Are there any built-in functions in pandas or python to solve the issue? Answer Ass…

Images Have Grey Values of True and False

I’m planning to process some images using PyCharm. However, I find a bug and start to find the reason. Finally, I find that the images have grey values of True and False, but they should be 1 and 0, is there any way to change it? The image is generated in PyCharm using: The Python version is 3.8.12. Ans…

How to Create a Tamil Phonetic keyboard inputs in python?

My target: create a Phonetic Keyboard in the Tamil language, using dictionary key mapping. My struggle: How to replace my keys with values and set that value to my textbox. For Example: If I press “K” in textbox1, then my textbox1.text will change into the Tamil letter “க்”, if I press…

How to take results of GROUPBY and expand to columns

Here’s an example of my working code that accomplishes what I want but is much too long. The resulting data frame is in the format I want here: I know that I can accomplish close to what I want with a groupby() on the ‘Specialty Type’ and the ‘Foundation Threshold’ using an .nuni…

Printing sales order doesnt work with exact online

I am trying to print a sales order with a known OrderId however it throws an error which I haven’t been able to debug. error is: What is the problem here? Please help Answer It turns out you need to use the json argument instead of using data. This becomes Content-Type header can be set as application/j…