![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
已删除ddd
做一个简单,明亮,快乐的手艺人。
展开
-
matplotlib.pyplot.plot(*args, **kwargs)
matplotlib.pyplot.plot(*args, **kwargs)Plot lines and/or markers to the Axes. args is a variable length argument, allowing for multiple x, y pairs with an optional format string. For example, ea翻译 2017-05-06 14:14:45 · 3223 阅读 · 0 评论 -
matplotlib-绘制精美的图标 第一节 快速绘图(I)
声明:内容全部来自《Python科学计算》(张若愚),仅供学习记录使用。如有兴趣,请尊重知识,购买正版。Github 链接使用pyplot模块绘图matplotlib的pyplot模块提供了与MATLAB类似的绘图函数调用接口,方便用户快速绘制二维图表。# -*- coding: utf-8 -*-"""@author: xusworld@file:转载 2017-05-06 12:59:22 · 2066 阅读 · 0 评论 -
matplotlib-绘制精美的图标 第一节 快速绘图(II)
配置属性matplotlib所绘制图表的每个组成部分都和一个对象对应,可以通过调用这些对象的属性设置方法set_*()或者pyplot模块的属性设置函数setp()来设置它们的属性值。例子import matplotlib.pyplot as pltimport numpy as npplt.figure(figsize=(4,3))x = np.arange(0, 5转载 2017-05-06 16:43:40 · 419 阅读 · 0 评论 -
pandas.get_dummies
Convert categorical variable into dummy/indicator variables参数data : array-like, Series, or DataFrameprefix : string, list of strings, or dict of strings, default NoneString to append DataFrame column ...原创 2018-06-30 15:58:53 · 1400 阅读 · 0 评论 -
利用pandas 处理缺失值
处理缺失值def missing_values(dataframe): missing_ratio = (dataframe.isnull().sum() / len(dataframe))*100 missing_ratio = missing_ratio.drop(missing_ratio[missing_ratio == 0].index).sort_values(asce...原创 2018-07-01 23:51:46 · 367 阅读 · 0 评论 -
pandas group分组与agg聚合
import pandas as pddf = pd.DataFrame({'Country':['China','China', 'India', 'India', 'America', 'Japan', 'China', 'India'], 'Income':[10000, 10000, 5000, 5002, 40000, 50000, 8000,...原创 2018-07-03 01:24:49 · 54212 阅读 · 11 评论 -
python b 'string'
str = '...' literals = a sequence of Unicode characters (UTF-16 or UTF-32, depending on how Python was compiled) bytes = b'...' literals = a sequence of octets (integers between 0 and 255)原创 2018-09-22 15:56:01 · 10462 阅读 · 1 评论 -
Python 获取当前目录路径和上级路径
转载在使用python的时候总会遇到路径切换的使用情况,如想从文件夹test下的test.py调用data文件夹下的data.txt文件:.└── folder ├── data │ └── data.txt └── test └── test.py一种方法可以在data文件下加入__init__.py 然后在test.py 中imp...转载 2018-09-22 15:58:31 · 1409 阅读 · 0 评论