关键词搜索

源码搜索 ×
×

数据分析python常用基础

发布2021-08-31浏览308次

详情内容

1 查看数据类型type()

2 格式化输出str.format()

image

3 字符串

拼接

image

查找

image

索引

image

分隔、移除首位字符

image

4 列表

复制

image

合并extend()

image

插入新元素append()/insert()

image

统计值出现次数count()

image

获取值出现的位置index()

image

列表索引

image

删除元素pop()/remove()

image

排序sort()

image

5 字典

image

6 元组——可不变,和列表类似

元组列表相互转换list()/tuple()

image

zip()函数

用于将可迭代的对象(列表、元组、字典键,值)作为参数,将对象中对应的元素打包成一个个元组,然后返回一个zip对象。可以通过list转换为列表,通常搭配fo使用。

image

7 运算符

8 分支和循环

分支

image

image

循环

image


python教程中,while … else 在循环条件为 false 时执行 else 语句块。

image

image


在 python 中,while … else 在循环条件为 false 时执行 else 语句块

image

break,continue、pass语句

9 函数

image

匿名函数

image

map()函数

image


function -- 函数,iterable -- 一个或多个序列.对iterable中的每个值都执行function操作。用list或for把结果取出来。

image

相关技术文章

点击QQ咨询
开通会员
返回顶部
×
微信扫码支付
微信扫码支付
确定支付下载
请使用微信描二维码支付
×

提示信息

×

选择支付方式

  • 微信支付
  • 支付宝付款
确定支付下载