I have a dataframe that I groupby() count and then sort_values() by count. I then take the head() and tail() of this dataframe to plot on a seaborn barplot(). H
I got 100% score on my test set when trained using decision tree and I think it's a bit strange, given that i set max_depth = 2. And I don't understand that I d
I am deserializing JSON data from file to a model object. I'm using a Django Rest Framework serializer. The JSON is quite large and I expected some fields that
I have this code here that can find the time in two different timezones at the moment. I want to calculate the difference in hours, between the two timezones. d
I am new to web scraping and am trying to extract a value from Yahoo finance. I am using pandas and match to search for the right row of data amongst the tables
I have done a lot of research but I can find a way to get the url of a file already downloaded.. I want to get the urls to make a program to sort my files by th
I want to make it so that when the word "exit" is typed the loop breaks and it prints a message. How do you do this? This is the code I have so far: file=open("
Can networkx tell me the edges that a shortest path travelled on? The example below gives me the output [['A', 'C']]. Is there a way to know the path travelle
I've tried using py_compile to get me some bytecode examples (for learning needs). However, this is what I get file.py: print("hello world") file.pyc: U A
how to change the group permissions in telethon? this permissions will applied to any new member joined the group. you can find this settings in telegram app, i
I am new to Celery. I want to run demo_task in parallel, but it runs tasks sequentially instead of in parallel. Please let me know if I did something wrong. imp
I have a dataframe p90results that contains daily counts of temperature exceedances from 12/01/1952-12/31/2021. I want to create a plot that sums the daily exc
I have a dataframe: id1 id2 a NaN b c d e I want to create new columns ids as a concatenation of id1 and id2: df.ids = df.id1 + "-" + df.id2
I'm trying to add utils from keras_unet in google colab, but I have a problem. import tensorflow as tfs from keras_unet import utils keras-unet init: TF versio
I'm needing to solve a problem where I have a plane in known 3D space (a court), and I know the coordinates of its corners (and other line intersections). I the
I have this function here that is factoring a number n. Right now I am using two processors to run the same function and as soon as one of the processors get a
I've got a Pandas DataFrame and I want to combine the 'lat' and 'long' columns to form a tuple. <class 'pandas.core.frame.DataFrame'> Int64Index: 205482
I have run a word2vec model on my data list_of_sentence: from gensim.models import Word2Vec w2v_model=Word2Vec(list_of_sentence,min_count=5, workers=4) print(
I am going through the flask tutorial up to the Test Coverage section. And after finishing writing all the test files listed in the tutorial documentation I get
I'd like to accumulate like this. timestamp id strength 1383260400000 1 strength accumulated by square id1 or id2 == 1 1383260400000 2 strength accumulated by