1>>> df2 = pd.DataFrame(np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]]),
2... columns=['a', 'b', 'c'])
3>>> df2
4 a b c
50 1 2 3
61 4 5 6
72 7 8 9
8
1# install pandas (basic, if path is not set yet)
2py -m pip install pandas
3# or set PATH to use pip:
4setx PATH "%PATH%;C:\<path\to\python\directory\>\Scripts"
5pip install pandas
6# if "connection error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed" [!]:
7py -m pip install --trusted-host pypi.python.org pip pandas
8# if PermissionError: [WinError 5] Access is denied
9py -m pip install --user pandas
10# or via creating a virtual environment venv:
11py -m venv c:\path\to\new\environment
12# then execute:
13c:\path\to\new\environment\Scripts\activate.bat
1>>> df2 = pd.DataFrame(np.array([[23, 99, 78], [65, 95, 90], [90, 98, 96]]),
2... columns=['krish', 'ishwar', 'raj'])
3>>> df2
4 a b c
50 1 2 3
61 4 5 6
72 7 8 9
8
1If you use Anaconda then it is preinstalled
2otherwise: pip install pandas
3
4import pandas as pd
5pd.__version__
1df = pd.DataFrame(np.random.randn(1000, 4), index=ts.index,
2 .....: columns=['A', 'B', 'C', 'D'])
3 .....:
4
5In [137]: df = df.cumsum()
6
7In [138]: plt.figure()
8Out[138]: <Figure size 640x480 with 0 Axes>
9
10In [139]: df.plot()
11Out[139]: <matplotlib.axes._subplots.AxesSubplot at 0x7f53723daa10>
12
13In [140]: plt.legend(loc='best')
14Out[140]: <matplotlib.legend.Legend at 0x7f5369d93dd0>