利用cloudflare workers免费加速wordpress博客
How to fix Google AdSense warnings about revenue loss risk due to ads.txt issues
谷歌 AdSense提示收益受损风险需要修正一些 ads.txt 问题的解决
Nginx reverse proxy TCP/UDP requests to map remote servers
nginx反向代理tcp/udp请求实现映射远端服务器
Install VNC Server on Alibaba Cloud centos7 for Graphical Access
阿里云centos7安装VNC Server实现图形化访问
Using Google Chrome to Test Interface Techniques
利用谷歌浏览器测试接口技巧
10 Tips to Improve Your Python Data Analysis Skills
In programming, even small tips or tools can make a big difference.
For example, a shortcut key or a helpful package might simplify a lot of work and double your efficiency.
Here I’ll share a few small tricks I often use.
1. Use pandas_profiling
to Inspect DataFrames
Understanding your data is essential before doing any analysis.
Although df.describe()
and df.info()
provide basic summaries, they’re limited with large or complex datasets.
The pandas_profiling
library offers detailed profiling through profile_report()
.
Installation
pip install pandas-profiling
# or
conda install -c anaconda pandas-profiling
Usage
It’s very easy to use:
import pandas as pd
import pandas_profiling
df = pd.read_csv("train.csv")
df.profile_report()
You can also export the report to HTML:
html = df.profile_report(title='Titanic Profiling Report')
html.to_file(outputfile="titanic_Profiling_Report.html")
2. Interactive Plotting with cufflinks
Pandas has built-in plotting via .plot()
, but it’s not interactive.
If you want interactivity, try the cufflinks
package.
10个建议提高你的python数据分析技巧
在编程的世界里,经常一些小小的建议或者帮助就可以起到很大的作用。 比如说有个快捷键或者一个包简单应用就可以起到简化大量工作,达到事半功倍的效果,这里我就介绍几种我经常用到的小技巧。
1. pandas dataframe的pandas_profiling函数查看数据情况
在分析数据前,了解我们的数据是数据分析里面很重要的一个环节,虽然在pandas里面有一些像df.describe,df.info()函数虽然起到了一定的查看数据的功能。但是对于较大的数据和比较复杂的功能他们就不再提供了,而pandas_profiling里面的profile_report函数却可以得到比较详细的数据情况。