All Questions
17 questions
1
vote
2
answers
318
views
How do I categorise and plot data from a Pandas dataframe using Matplotlib?
I have a DataFrame of Tweet values and want to plot a graph of 'Favourites' against 'Date' and categorise/colour-code the data by 'User'.
I am able to get a scatter or bar plot of the data but ...
0
votes
0
answers
36
views
Plotting multiple dates on year in scatterplot Python
I have data that has Dates that I would like to be able to automatically split in a scatterplot and looks like:
Date Level Price
2008-01-01 56 11
2008-01-03 10 ...
-1
votes
1
answer
123
views
Function does not finish executing in `hist` function only on second time
In Python DataFrame, Im trying to generate histogram, it gets generated the first time when the function is called. However, when the create_histogram function is called second time it gets stuck at h ...
0
votes
1
answer
44
views
Dataframe to plot different charts from groups in columns
I have a dataframe that has multiple columns, containing different categories (['A'], ['1','2','3','4'])
Index1 Index2 X Y
A '1' 1 2
A '1' 5 3
A '1' 3 ...
0
votes
1
answer
52
views
Match 2 Graphs in an only image matplotlib
I´m trying to create some graphs from a dataframe I imported. The problem is I can create an only image with both graphs. I have this output:
And I´m looking for this Output:
Here is the code:
from ...
1
vote
1
answer
245
views
pandas: count the occurrence of month of years
I have a large number of rows dataframe(df_m) as following, I want to plot the number of occurrence of month for years(2010-2017) of date_m column in the dataframe. Since the year range of date_m is ...
0
votes
0
answers
51
views
Python: plot different kinds of colors [duplicate]
I wan t to plot 8 lines in a one figure with different color, and labels. however, there are two problems:
1) I found some lines almost the same color, I want to differet color for lines.
2) label is ...
1
vote
1
answer
378
views
ValueError: invalid literal for float(): when adding annotation in pandas
I get this error when I try to add an annotation to my plot - ValueError: invalid literal for float(): 10_May.
my dataframe:
my code (I use to_datetime and strftime before ploting as I needed to ...
0
votes
1
answer
477
views
Stacking scatter_matrix and matshow
I was using the iris data from sci-kit-learn to obtain following data frame:
df = pd.DataFrame(data= np.c_[iris['data'], iris['target']],
columns= iris['feature_names'] + ['target'...
0
votes
1
answer
653
views
Python - Create 2 line graph from pandas DataFrame
I am trying to create a line graph from my Pandas Dataframe. The Pandas Dataframe I have looks as follows:
date Interrupts_Person Interrupts_Mean
0 20122013-100-3 0 11.727273
1 ...
1
vote
1
answer
2k
views
matplotlib: Plot multiple small figures in one big plot
I have a pandas dataframe pandas_df with 6 input columns: column_1, column_2, ... , column_6, and one result column result. Now I used the following code to plot the scatter plot for every two input ...
0
votes
1
answer
6k
views
Pandas plot without specifying index
Given the data:
Column1; Column2; Column3
1; 4; 6
2; 2; 6
3; 3; 8
4; 1; 1
5; 4; 2
I can plot it via:
import pandas as pd
import matplotlib.pyplot as plt
df = pd.read_csv('test0.csv',delimiter='; ', ...
1
vote
3
answers
4k
views
Pandas plot dataframe by index, how it works?
Given the data:
Column1; Column2; Column3
1; 4; 6
2; 2; 6
3; 3; 8
4; 1; 1
5; 4; 2
With the following code I get the following graphic:
import pandas as pd
import matplotlib.pyplot as plt
df = pd....
-4
votes
1
answer
186
views
How to plot a Python Dataframe with category values like this picture?
How can I achieve that using matplotlib?
0
votes
0
answers
77
views
subplots only plotting 1 plot using pandas
I am trying to get two plots on one figure using matplotlib's subplots() command. I want the two plots to share an x-axis and have one legend for the whole plot. The code I have right now is:
...