I have data stored in a NumPy structured array where part of the information identifies various cases. I would like to find the row that matches a given case. E.g., let’s say I’m storing the name of a building, room number, and the number of chairs and tables in the room in a (2,) array. This would then look something
How to align a frame to the left in tkinter?
So I created this GUI in Tkinter. The X, Y and Z labels and entries are in a frame, and I need that frame to be justified to the left (I want it to be next to the “Nombre” entry). I tried the sticky = “w” option in the frame but that didn’t seem to work. Thank you for the
Sqlite table reverting to old data after about a hour inactivity
I made my own counting bot on discord to practice coding. The bot will work fine if messages are sent within about an hour of the last message. After a hour sometimes my bot will work, sometimes won’t and the data on my sqlite table will be reverted to previous data. This causes the bot to think that the number
Pyinstaller loading splash screen
Pyinstaller recently added a splash screen option (yay!) but the splash stays open the entire time the exe is running. I need it because my file opens very slowly and I want to warn the user not to close the window. Is there a way I can get the splash screen to close when the gui opens? Answer from pyinstaller
GaussianProcessRegressor ValueError: array is too big; `arr.size * arr.dtype.itemsize` is larger than the maximum possible size
I am running the following code: The shape of my input is: (19142, 21) dtypes are each: float64 Added in Edit: X and y are Pandas Dataframes. After .values they’re each numpy arrays And I get the Error: ValueError: array is too big; `arr.size * arr.dtype.itemsize` is larger than the maximum possible size. I cant image a dataset of 20000
Trying to stack several groups of columns into multiple target columns by name
I have the original dataframe like that which contains 1772 columns and 130 rows. I would like to stack them into multiple target columns. id AA_F1R1 BB_F1R1 AA_F1R2 BB_F1R2 … AA_F2R1 BB_F2R2 … AA_F7R25 BB_F7R25 001 5 xy xx xx zy 1 4 xx 002 6 zzz yyy zzz xw 2 zzz 3 zzz I found two different solutions that
selenium , how to print elements of this html in order as they are?
if this is the html of a whatsapp message (“😅 how 👹 are you 🎂”) then how to iterate through elements of this message and get them (print them) in order as they are by selenium? output this should be or output can also be like this i tried this this is giving output as so how to get elements
Python Seaborn dynamic update of heatmap data
I would like to update dynamically a heatmap made with Seaborn, adding data line one by one. The sample code below get the basics work done, but instead of updating the heatmap it seems to nest a new one in the previous one. Thank you in advance for any help/solution you may provide. Answer I re-structured your code in order
Right align horizontal seaborn barplot
How can I make the horizontal seaborn barplot right aligned / mirrored The default horizontal barplot looks like this I want to have something like this (with proper xticks) Answer In order to invert the x axis, you can use: Then, in order to move the labels to the right, you can use: or, shorter: Complete Code
Convert object column format “%d-%b-%y” to datetime, where month initial letter is Upper or lowercase and Month can be in italian or english
For this dataframe (link): I want to convert columns [Issue date, Redemption date] to datetime format. The format variations are: Month is lower case: 01-set-09 Month in Italian 01-set-09 (settembre-italian instead of September-English) I have tried using: and this one: however i get the following error: Here is a working code that generates my error: EDIT FROM MrFuppes answer when