pycharm

Adding hatch to Seaborn multi-boxplot

Adding hatch to Seaborn multi-boxplot Question: In the chart below, I want to add hatch (‘/’) only to the ‘rest’ category in both boxlots. I will be glad if you help I add the sample codes below: import seaborn as sns exercise = sns.load_dataset("exercise") df1=exercise.loc[(exercise["diet"]=="low fat"),:] df2=exercise.loc[(exercise["diet"]=="no fat"),:] fig, axes = plt.subplots(1, 2) ax1=sns.boxplot(x=’kind’, y=’pulse’, …

Total answers: 1

Unable to initialize device PRN on Pycharm

Unable to initialize device PRN on Pycharm Question: New to PyCharm, was wondering what is going wrong, I have the newest Pycharm update installed, can’t run terminal commands on PyCharm for some reason. Every time I try, I get the "Unable to initialize device PRN" response from PyCharm. For context, I do have Python installed …

Total answers: 2

How do I remove float and NaN

How do I remove float and NaN Question: I’m trying to convert a list with over 20 rows and convert into a data frame but I’m running into an issue. When I convert my list, it returns a float and nan in some of the numbers in my data frame. Is there a way to …

Total answers: 2

How to fix TypeError: cannot unpack non-iterable Button object

How to fix TypeError: cannot unpack non-iterable Button object Question: I was writing my PySimpleGUI program and it (Still) does not load This is the error it gives me: Traceback (most recent call last): File "D:PythonLavoro.py", line 89, in <module> event = window.read() ^^^^^^^^^^^^^ File "D:PythonvenvLibsite-packagesPySimpleGUIPySimpleGUI.py", line 10075, in read results = self._read(timeout=timeout, timeout_key=timeout_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ …

Total answers: 2

os.listdir returns the error: no such file or directory even though the directory actually exists

os.listdir returns the error: no such file or directory even though the directory actually exists Question: This is my project files structure: and this is my main.py script: if __name__ == ‘__main__’: leukemia_dir = "../dataset/leukemia" # if I click here, I get redirected to the folder file_names = os.listdir(leukemia_dir) # << won’t work Unfortunately, os.listdir(leukemia_dir) …

Total answers: 2

How to protect python script from editing

How to protect python script from editing Question: I am building a python script for my co-workers to use. what I want for my co-workers is to be able to run and view the script but not to edit the script when they download it from GitHub. I explored a few options like in this …

Total answers: 1

Overload type hint with Literal and Enum not working in PyCharm

Overload type hint with Literal and Enum not working in PyCharm Question: I want to typehint an overload function. For that I use the overload decorator from typing. I want to set multiple possible callees based on a parameter’s value. This parameter is color. I have this code: from typing import Literal, overload from enum …

Total answers: 1