文章目录
Python3数据分析:函数总结(第38章)
一、内置函数总结
1. 数学运算类
abs(x)
:返回数字的绝对值round(number[, ndigits])
:四舍五入pow(base, exp[, mod])
:幂运算(支持模运算)sum(iterable[, start])
:求和min(iterable, *[, key, default])
:最小值max(iterable, *[, key, default])
:最大值divmod(a, b)
:返回商和余数的元组
2. 类型转换类
int(x, base=10)
:转换为整数float(x)
:转换为浮点数str(obj)
:转换为字符串bool(x)
:转换为布尔值list(iterable)
:转换为列表tuple(iterable)