so ive run into a problem where i cant get acces to they key in riot json file. http://ddragon.leagueoflegends.com/cdn/11.16.1/data/en_US/item.json this is official riot link which u can find on their riot api site under Items. if you write this: it gives back all the values If you write this: it gives back t…
How do I extract the last trading day from a csv file?
I have a csv file which contains 30 years of stocks data. A portion of it looks like this: How can I extract the last trading date of a specific month of a specific stock, say the last trading month of June 2018 of stock s_0003? This is my code, but it doesn’t seem to be working for me because
numpy.AxisError: axis 2 is out of bounds for array of dimension 0
I’m creating a program the requires a black and white image and two arrays containing the X and Y coordinates of both black and white pixels respectively. I have a program that utilizes OpenCV and binary thresholding to create a black and white image (code source). Hear is the code I have in full so far…
Matplotlib change Figure size
Good morning everyone, I’ve been playing around with matplotlib recently and I drafted some Charts. Unfortunately, I’m currently stuck, as I cannot resize the chart (Code and Screenshots below, sorry for the chaos with the dates). I tried using figsize but it just doesn’t change the output i…
I was using pysimplegui and i want to position button on the right side
if i put element_justification as center i get button on the center, if i put element_justification on the right then text is also on the right even thoguht i putted justification in the text separately, i need text in center and button align to the right of the window. Answer There’re something about t…
beautifulsoup: Unable to get correct info from dividendinvestor with cookie
I’m trying to get some data from dividendinvestor.com. But the content results did not have any information such as “Consecutive Dividend Increases”. Does anyone has a work around for this? Answer As you can get ajax request URL from Network tab which returns json data you can parse it to bs…
Plotting subgraphs identified by connected components
I have detected connected components in my graph. Now I would need to plot them in separate charts for analyzing them individually.As example I am using karate club network, but my network has actually 5 connected components. I used nx.draw but nothing has been displayed: Answer S is not a subgraph but a list…
2D list python unable to get it right
im trying to the below code but when I run the function for examnple: finder(“001-987654-003”) Nothing is happening. What went wrong? Answer try this: output:
Filter and calculate % of a dataframe column
I am trying to calculate the % of men and women in a dataframe column named “gender”. “gender” is defined as an object taking 3 values : “Man” “Woman” “nan” (NA). I did this : But it returns 0.0% for both. When i check ‘total’ value it re…
Runtime Error: Incomplete output while executing buy function for cs50 finance
While all the checks work, (empty symbol, invalid number of shares…), the function fails to actually purchase the stocks. It returns an internal server error. Following is the log output: File “/usr/local/lib/python3.9/site-packages/cs50/sql.py”, line 71, in _execute raise RuntimeError(exc.o…