# install pandas (basic, if path is not set yet)
py -m pip install pandas
# or set PATH to use pip:
setx PATH "%PATH%;C:<path opythondirectory>Scripts"
pip install pandas
# if "connection error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed" [!]:
py -m pip install --trusted-host pypi.python.org pip pandas
# if PermissionError: [WinError 5] Access is denied
py -m pip install --user pandas
# or via creating a virtual environment venv:
py -m venv c:path o
ewenvironment
# then execute:
c:path o
ewenvironmentScriptsactivate.bat
d = {'col1': [1, 2], 'col2': [3, 4]}
>>> df = pd.DataFrame(data=d)
>>> df
col1 col2
0 1 3
1 2 4
If you use Anaconda then it is preinstalled
otherwise: pip install pandas
import pandas as pd
pd.__version__
# this is pandas in python
import pandas as pd
dic={'name':["mark",'ellon'],
'roll_no':[32,24]}
df=pd.DataFrame(dic)
print(df)
import pandas as pd
data = {
"calories" : [420, 380, 390],
"duration" : [50, 40, 45]
}
df = pd.DataFrame(data)
print(df)