标签:
IN Python
from pandas import DataFrame,Series
import pandas as pd
import numpy as np
data = pd.read_csv(r‘C:\Users\lxy\Desktop\工作相关\工作报告KPI\pydata-book-master\ch06\ex5.csv‘)
data.index.name=‘x‘
IN R
> library(ggplot2)
> df <- read.table("D:/df.csv",header=TRUE,sep=",",row.names="x")
> df
something a b c d message
0 one 1 2 3 4
1 two 5 6 NA 8 world
2 three 9 10 11 12 foo
> p <- ggplot(df,aes(x=something,y=a))
> p+geom_bar(stat="identity")
> p+geom_bar(stat="identity",fill="lightblue",color="black")
Python中处理DataFrame,R绘图
标签:
原文地址:http://www.cnblogs.com/linxingyi/p/5598446.html