I would like to smooth out a simple line graph with dummy data in a DataFrame. I'm aware of interpolate but all of the tutorials work with simpler numpy arrays ; i would like each of the lines generated by the columns to be smooth. If anyone has experience, or knows how to do this, would be greatly appreciated.
For reference, here is some code, and the resulting graph.
# amps
df=pd.read_csv("~/data/poli.csv")
#################################
# wp
wave = (df.right + df.left)**2
df['concord'] = wave
print(df)
which outputs:
issue right left concord
0 end div 1 1 4
1 for trump 1 -1 0
2 aisle cross 1 1 4
3 for blm -1 1 0
4 help world 1 1 4
5 service 1 1 4
6 community 1 1 4
Then I plot the columns, setting the x axis to 'issues', and the y label to 'score'
plot = df.plot(x='issue',
linewidth=9,
alpha=0.36)
plot.set_ylabel('score')
plot.set_xlabel('issues')
plot.legend(bbox_to_anchor=(1, 1), loc='upper left', ncol=1)
concord=df['concord'].values
left=df['left'].values
right=df['right'].values
plt.show()
And the resulting plot is generated.

