This might be a very niche Problem. I have a modified Dataset – based on the 4th downloadlink with 105572 elements – and want to know how I can model it in the best way. I had to use Arena Software from Rockwell Software. I got the following as a result for a distribution: “816 + LOGN(198, 439)” I…
Tag: python
How do I use indexing to swap letters from a text file, using two different lists?
I’m in the process of making an encrypting/decrypting code and here’s what I have so far… I’m essentially trying to modify a text file in 3 ways, paste it to another file, then use that file to decrpyt the text file, and place it inside of another file. The only real problem I’m …
How to make sns.jointplot histogram into a smooth kde?
I’m plotting some data using sns.jointplot and I want the data inside the scatterplot to remain as points and the histograms on the side to be kde plots instead. I’ve tried using the kind=’kde’ argument, but this changes the data inside to not look like points in a scatterplot anymore.…
Linear regression prediction based on group of data in test set
I have a simple dataset which looks like this: I created a simple LR model to train and predict the target variable “sales”. And I used MAE to evaluate the model My code works well, but what I want to do is to predict the sales in the X_test grouped by hour of the day. In the above dataset example…
opening txt file and creating lists from the txt file
I’m trying to Read the file “covid.txt” into two lists. The first list should contain all the “day” values from the file. The second list should contain all the “new cases” values. my list in column I needed to be this way I have tried so many different things I’…
How to convert dataframe column into list of lists json format?
My dataframe looks like below and I want to use sales column and convert it into json files for each month as a list of lists. sales dt 156 2022-01 192 2022-01 147 2022-02 192 2022-02 Using this, I am getting this format of json files: However, I want to have: I have created this as a toy example. I
How to read dictionaries in list of dictionaries in python
I am trying to read some JSON for a leaderboard for my discord bot, formatted like this: I can read the first part fine, but reading this list here is giving me some problems: How can I read the values of each of the dictionaries in the list? For example, say I want to get the dictionary with the key
How to set merge and normalize multple dataframes for pd.merge_as_of
I am trying to merge multiple dataframes using pd.merge_asof. They all contain 2 columns with datetime as index column and a variable column with floating values. They are not balanced in their indexes and times so I have to normalize the values. I can succesfully merge the dfs and normalize the values like t…
my camera doesnt turn on while Coding in opencv
I am beginner in CV. My camera crash every time. I mean camera light is ON but the there is no camera display Could someone help me? Here is the code Answer i think you put waitKey in wrong place, I hope below code will work !
Ungrouping a pandas dataframe after aggregation operation
I have used the “groupby” method on my dataframe to find the total number of people at each location. To the right of the “sum” column, I need to add a column that lists all of the people’s names at each location (ideally in separate rows, but a list would be fine too). Is there …