Skip to main content

All Questions

0 votes
1 answer
54 views

Matplotlib Plotting repeating steps in x axis

I have a dataframe like the following: ID Parm_1 Parm_2 Result 0 100 100 0.2 1 100 200 0.4 3 100 300 0.9 4 100 400 0.45 5 ...
pb.'s user avatar
  • 135
1 vote
1 answer
76 views

plotting vertical lines on pandas line plot with multiindex x axis

I have a dataframe whose index is a multiindex where axes[0] is the date, and axis[1] is the rank. Rank starts with 1 and ends at 100, but there can be a variable number of ranks in between as below. ...
dayum's user avatar
  • 1,105
0 votes
1 answer
77 views

Manipulate data in a DataFrame

I am very new to Python, so please bear with me. I have this dataframe called df_staging (sample image) that summarizes the annual sales and income for multiple counties (A1,A2,A3,A4,etc.). I want to ...
Kendo96's user avatar
  • 15
1 vote
2 answers
131 views

How to plot a Probability Density Function in Python?

I want to plot a Probability Density Function for the offsets from a log file. Here is the code: timestamps = [] sequences = [] log_Name = 'test_rtt_25-01-17_13-07-41_values5_rate50.log' log_Path = &...
HUH987's user avatar
  • 17
1 vote
1 answer
43 views

Why does my plot have criss-crossing lines when I convert the index from string to datetime?

I am trying to plot a time series with plt.plot() but I am constantly observing some strange output. A sample of the dataset I am providing below (the whole dataset has roughly 150,000 entries). One ...
Lyudmil Yovkov's user avatar
0 votes
0 answers
26 views

plot pre-computed mean and confidence intervals for two types of firms (python)

I want to plot two time-series lines with mean and CI each for low and high diversity firms (variable div_ind) throughout 8 calendar years (variable calyr). May I know how to do it? Online sources ...
Jaevapple's user avatar
0 votes
1 answer
67 views

How to replace column value without losing the style?

This is my styled dataframe: What I want is to change send the value of aEV to aEV_percentile, but without losing the styles, or to be much more specific, without losing the background color of ...
Ivan J.'s user avatar
  • 109
0 votes
1 answer
72 views

Efficient Mapping of Average Scores Across Interval Windows

I have a df of genomic intervals with millions of rows for example: chromosome start end 1 300 500 1 400 600 ... ... ... find the center of each interval (+/...
youtube's user avatar
  • 504
2 votes
1 answer
81 views

How to sort two columns in pandas dataframe and draw the heatmap from resulting dataframe?

I am trying to draw the heatmap from dataframe below: methods sub_1 sub_2 sub_3 sub_4 ..... distance count_0 m1 0 2 2 1 ..... 0 20 m2 1 2 2 1 ..... 7 22 m3 1 2 2 1 ..... 26 12 m4 0 2 2 0 ..... 21 10 ...
Rajesh Ahir's user avatar
0 votes
2 answers
55 views

Why does matplotlibs bar seem to automatically order by the x-axis?

I have two arrays, one with identifier ids, and one with values, e.g ids = [1,7,5] values = [3.0, 9000.0, 2.7] so 1 belongs to 3.0, 5 to 2.7,.... For whatever reason, no matter what I do, my ...
actopozipc's user avatar
0 votes
2 answers
56 views

Why is my code subtitles still overlaping even after tight_layout()? [duplicate]

I tried looking it up but I am pretty new to coding and couldn't figure out, in all the examples I found the subtitles would stop overlapping after tight_layout. I am writing an anime code that shows ...
vis's user avatar
  • 11
3 votes
1 answer
70 views

Plotting a timeseries as bar plot with pandas results in an incorrect year

I have the following dataframe (except my actual data is over 25 years): import pandas as pd df = pd.DataFrame( dict( date=pd.date_range(start="2020-01-01", end="2020-12-31&...
kdheepak's user avatar
  • 1,366
0 votes
0 answers
28 views

Making two boxplots in one figure doesn't work in python

I've been facing the problem which is not able to check two box plot in one figure in python. (Dataframes of the two box are different as well.) I do not know the reason of this problem, even though I'...
nodistraction96's user avatar
1 vote
1 answer
44 views

How to plot dataframe as a table along side a graph?

Hi i have a dataframe called metrics which has 2 rows × 31 columns. I am plotting a graph using this: unit_ids = sorting_rec.unit_ids plt.figure(figsize=(12, 8)) sw.plot_unit_templates(we, unit_ids=...
Kshtj's user avatar
  • 109
-1 votes
1 answer
56 views

Trying to add record they are just not showing

i am making a school project on examination management so it a basically a program that manages csv file records and all but my code just isnt it working i just cannot understand why here is the code ...
QBBT's user avatar
  • 1

15 30 50 per page
1
2 3 4 5
97