1.Python应用场景
python练习100例https://www.runoob.com/python/python-100-examples.html
2.Windows+Py3.8.5+Anaconda3-2020.07
Py3.8.5官网下载缓慢
使用镜像网站——清华大学等
使用第三方——360软件管家(最快)
Anaconda官网下载
3.代码练习
# print("hello world")
# str = input()
# print(str)
# print(str.upper()) # 变大写
# print(len(str)) # 输出输入字符的个数
# ctrl+alt+L 对代码排版
# 第三方镜像网站安装包
# pip install -i https://mirrors.aliyun.com/pypi/simple/ pandas (pandas是一个强大的分析结构化数据的工具集;它的使用基础是Numpy(提供高性能的矩阵运算);用于数据挖掘和数据分析,同时也提供数据清洗功能。)
# 升级包pip install --upgrade pandas
# whl文件本地安装
# coding:utf-8
import pandas as pd
data = {
'name': ['刘德华', '黎明', '郭富城', '张三', '李四', '王二', '刘武'],
'gender': ['1', '0', '1', '0', '1', '1', '0'],
'age': ['15', '52', '43', '43', '35', '26', '17'],
'height': ['1.55', '1.62', '1.73', '1.94', '1.85', '1.66', '1.77'],
}
frame = pd.DataFrame(data, index=[1, 2, 3, 4, 5, 6, 7]) # index强行规定序号从1-7
print(frame)