What ~ in isin pandas method means&

filtered_df = df[~df.index.isin(df_to_remove)] What does this ~ reduction mean? Found it in answers to the task? Was written by smn smart Answers: Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the … Read more

How can I import file as normal user in python?

I have a python app that run bash shell commands that require root priviledges. In terminal I type “sudo python3 main.py” then load python app file. Python app run mostly sudo commands so I always have to run it with sudo python3 main.py. In the main.py file in the beginning I have import settings.py file that save some important settings. settings.py file read and write INI File in home folder /home/username/.config/myapp/config.ini. So when I run the main.py app the settings.py create a folder myapp inside /home/username/.config/ and then create the config.ini filename.