摘要:
阅读全文
摘要:
一、原生绘图案例 二、结合numpy 阅读全文
摘要:
阅读全文
摘要:
import numpy as np import pandas as pd #1.聚合一次 df=pd.DataFrame({"age":[18,20,22,22,23,23], "name":["A","B","C","D","E","F"], "price1":[1000,900,800,70 阅读全文
摘要:
import numpy as np import pandas as pd #1.聚合一次 df=pd.DataFrame({"age":[18,20,22,22,23,23], "name":["A","B","C","D","E","F"], "price1":[1000,900,800,70 阅读全文
摘要:
import numpy as np import pandas as pd df=pd.DataFrame(np.arange(25).reshape(5,5)) new_order=np.random.permutation(5)#不暗中哦顺序排列 print(df.take(new_order 阅读全文
摘要:
import numpy as np import pandas as pd import tushare as ts df=pd.DataFrame(np.random.randn(1000,4)) print(df.head()) print(df.describe())#列出一些信息 prin 阅读全文
摘要:
import numpy as np import pandas as pd import tushare as ts #1. df=pd.DataFrame({"num":[1,2,3,4,3,2,1,4], "id":["A","B","C","D","C","B","A","D"]}) pri 阅读全文
摘要:
import numpy as np import pandas as pd #1.一对一 df1=pd.DataFrame({"name":["A","B","C"], "age":[30,32,33]}) df2=pd.DataFrame({"name":["A","B","C"], "tall 阅读全文
摘要:
import numpy as np import pandas as pd a=np.array([1,2,3]) b=np.array([3]) print(a+b)#[4 5 6] 只要列一致,广播,每个都加 s=pd.Series([1,2,3,4]) print(s+1)#Series与数 阅读全文
摘要:
import numpy as np import pandas as pd 1. df1=pd.DataFrame({"name":["wangchenyang","guanchenhao","dongshuai"], "age":[30,32,33]}) df2=pd.DataFrame({"n 阅读全文
摘要:
import numpy as np import pandas as pd #1.完全匹配 df1=pd.DataFrame({"name":["wangchenyang","guanchenhao","dongshuai"], "age":[30,32,33]}) df2=pd.DataFram 阅读全文
摘要:
import pandas as pd def make_dataFrame(cols,ind): data={c:[str(c)+str(i) for i in ind] for c in cols} return pd.DataFrame(data,ind) x=make_dataFrame(" 阅读全文
摘要:
import numpy as np import pandas as pd x=np.array([1,2,3]).reshape(1,3)#调节形状为二维数组 y=np.array([4,5,6]).reshape(1,3) z=np.array([7,8,9]).reshape(1,3) pr 阅读全文