i’m writing a code with a sunburst chart that will present all classes from some type of data, and when the user click on what class he wanna see my dropdown menu should present values only from that classe. So, my difficult where how to do this callback, cause all the ways that i tried failed. my df used look
Tag: python
How to make sprite move to point along a curve in pygame
I’m doing a pygame project for practice and I need a sprite to move to some point on screen and I did it, but it moves in a straight line and I would like to learn how to make it move to the same point in a curve. This movement looks like and I would like it to be like
How to increase the size of only one plot in subplots?
If you have two subplots, how do you change the length of only the second plot? Adding figsize=(7,5) to plt.subplots changes the size of both plots, but hoping to change only the size of the 2nd one. source code: https://www.w3schools.com/python/matplotlib_subplot.asp There are no errors, but how do you adjust the size of only the 2nd plot but keeping the placement
duplication of messages in stderr and stdout python logging
I would like to log info and warning level to stdout and error level and above to stderr how can I do it ? code: logging.conf and output after python3 -m tests 1> output.log 2> err.log: err.log output.log Consequently, the output on the console is: My question is how to make the message not repeat itself ? I want ERROR
Creating a list of positions of a substring within a string (DNA) (Python 3)
I am doing a bioinformatics course and I am trying to write a function to find all occurrences of a substring within a string. The output above should exactly match the following: [2, 4, 10] [2, 5, 6, 15, 17, 18] How can I fix this? Preferably without using regular expressions. Answer It looks like you badly indented the code,
how to Send dataframe as html table with font styling based on text value as a email attachment
I have a dataframe, In that if the value is starting with letter “A” i’m styling it in red color, now i need to send it as html table in mail but when i execute it its coming without that styling, below is the code i tried please help. please check the image for df style enter image description here
Merge using threads not working in python
I have to merge two lists and every time a full the lists in order to merge them , but what is happening that I did it like this : but what is happening that filling_buffer_thread and create_inverted_index_thread just called one time, and not working again, when I debugged the code I see that filling_buffer_thread stopped I don’t know if
How to change data type in a list of tuples if this type is Timestamp?
I have a list of tuples like this: What I do is: How can I do to change directly the Timestamp type in this list of tuples ? More precisely, if type is pd.Timestamp I would like to change it to np.datetime64. Answer This is an example that should explain what you are missing. The result: [[’12’, 123, ‘test_1′], [’14’,
error: (-215:Assertion failed) !empty() in function CV2 Error
I am making a program in python that just draws a rectangle around a car. I am currently stuck on getting the coordinates of the car, here is the code: I am running in on an error with the function “cv2.detectMultiScale”. error: I have tried googling, it says to use cv2.CascadeClassifier(cv2.data.haarcascades + “cars.xml”) instead of cv2.CascadeClassifier(“cars.xml”). It didn’t work :(,
ezdxf issue when creating drawing with layers
I have encountered an issue when creating a new drawing using the ezdxf library. I need to create a new dxf drawing, AutoCAD release R2000, so I use the following commands: New entities, e.g. a simple line, are added on separate layers. For example: And then at the end: for saving the document. This works fine: I can create a