Skip to content

Tag: pandas

Break line chart on the plot

I have a dataframe with a column for weeks and data captured for each week. it looks like this Now I am plotting a line chart with this data . Notice that from week 23 to week 40, we didnt have data. so my intention is to skip this weeks on the plot and only have a line chart of

Pandas: filter on grouped and aggregated dataframe

I have a dataframe which is based on a read-in excel list. The data has multiple columns and rows with one unique identifier. I want to plot the data through a PyQT interface based on some user selection (checkboxes), but I cannot select one unique row for plotting. The data looks like this: After I get this:…

pandas split values in column

I’m new to pandas (version 1.1.5) and have tried str.split() and str.extract() to split column POS of numerical values with no success. My dataframe is about 3000 lines and is structured like this (note _ and – delimiters in subset): I would like for the dataframe to look like this (i.e. retain va…

using set() with pandas

May I ask you please if we can use set() to read the data in a specific column in pandas? For example, I have the following output from a DataFrame df1: where the first column is the index.. I tried first to isolate the second column using the following: x = pd.DataFrame(df1, coulmn=[0]) Then, I transposed th…