Category "pandas"

time series bar plot showing the values being the sum for a given time period

There has a time series data, such as the following ones. Time Order nun 0 2/10/2019 200 1 3/3/2019 150 2 3/15/2019 50 3 3/2

Convert x same size 2D numpy arrays to a 2+x column data frame

I have two ndarrays of size (m x n), and two lists of length m and n respectively. I want to convert the two matrices to a dataframe with four columns. The firs

pandas dataframe not posting correctly to excel

I've an excel sheet "Calcs" with 1 column name "old". I'm trying to add new column "new" with a fixed value of "1" to existing sheet "Calcs" and am using below

The Jupyter do not show border lines and grey blocks

everybody. I learn NumPy and pandas with the Jupyter. When printing, it does not show borderlines and grey blocks. Example: Should be: How to solve it? Thank

Pandas combine two columns with delimiters

I have two columns which have delimiters: column1 column2 a,b,c,d e,f,g,h h,i j,k l,m,n o,p,q ... ... I am trying to group them as ae

ML on apache logs

I am trying to visualize and predict application logs (I am using category model), my label category is on response time, my sample log is on below format 172.1

Pandas internals - "Index labels must be unique"

The Pandas Internals documentation (v1.2.4) states In pandas there are a few objects implemented which can serve as valid containers for the axis labels: Index

How to ensure that the labels of two axes do not overlap?

I have some questions about labels of axs. Firstly,I have 2 subplots which can be seen below. As you can see, labels of first ax are overlapping with the second

Python Pandas how to get f-string to work in an url

I am getting an error of urllib.error.HTTPError: HTTP Error 404: Not Found. I feel like f-string should work for the url but it is not how would I fix this? imp

Choose the rows with special conditions in dataframe

I have a dataframe, I want to choose the rows which their average value for column val1 until val4 is greater than 1 and the number of zeros for the row is not

Pandera: Is cell based dataframe data validation possible?

Every row of my dataframe contain a record with a unique key combination. The data validation will be based on the columns and on key combination. For example,

How to fill in the blanks for one (or more) columns by calculating based on multiple conditions?

I collect and process hundreds of jumbled tables every day, and some of the data requires attention. (Sorry for my English and typography skills) The item with

How to create a new index level with columns name in Pandas?

I would like to add a new level to the index of a dataframe, based on columns name. How can i do that ? df home city A -0.166809 0.213299 B -0.

Saving data in the table

How I can save this: a=1b=2c=3d=4 into the table like this (I do not need header): 1 2 3 4 Thanks.

How do I turn dataframe#1 into something i can properly graph, like dataframe#2? [duplicate]

I have the following dataframe, based on data i pulled from my database: date event_type count 2022-05-10 page_view 3 2022-05-11 cart_add 2 2

Exception has occurred: ModuleNotFoundError No module named 'tensorflow.python'

im working on Simple RNN code with python, i want to use keras but when i run the code it show to me ( tensorflow error ), i uninstall tensorflow then i install

calculationg the mean from each Dataframe column

I've to write a function (column_means), that calculates the mean of each column from Dataframe and give me a list of means at the end. I'm not allowed to use t

Dataframe extracted from email, ValueError: Cannot index with multidimensional key

A dataframe extracted from email (email saved to local disk, ".msg"), that I am not able to read its content. The dataframe extracted from email, when wrote to

Data problem: identifying data rows where colleagues have reached a consensus

I have a table that shows the results of four colleagues trying to classify several objects as either a, b, c or d. If the colleagues were able to agree on the

Chaining Pandas DataFrame Styles

*edited DataFrame random generator I have 2 dfs, one used as a mask for the other. rndm = pd.DataFrame(np.random.randint(0,15,size=(100, 4)), columns=list('ABCD