利用cloudflare workers免费加速wordpress博客

在提升体验上,网站总是不惜代价提升自己的网站的加载速度,为了获得这种效果,google推出了amp项目,百度推出了mip项目,但是为了获得这种效果,需要另外部署一套网站代码,实在过于繁琐,增加开发成本……

阅读全文

利用谷歌浏览器测试接口技巧

在编写爬虫的时候,经常会因为手动修改header和cookie之类的问题弄得焦头烂额,总是出错,这里介绍一个非常方便的利用chrome自带的工具进行python版本的requests请求。……

阅读全文

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().

pandas_profile

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()

titanic

You can also export the report to HTML:

html = df.profile_report(title='Titanic Profiling Report')
html.to_file(outputfile="titanic_Profiling_Report.html")

titanic_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函数却可以得到比较详细的数据情况。 pandas_profile

……

阅读全文

最近文章

分类

标签

友情链接

其它