- Hands-On Exploratory Data Analysis with Python
- Suresh Kumar Mukhiya Usman Ahmed
- 120字
- 2021-06-24 16:44:57
Number of emails
The answer to the first question, "How many emails did I send during a given timeframe?", can be answered as shown here:
print(dfs.index.min().strftime('%a, %d %b %Y %I:%M %p'))
print(dfs.index.max().strftime('%a, %d %b %Y %I:%M %p'))
print(dfs['label'].value_counts())
The output of the preceding code is given here:
Tue, 24 May 2011 11:04 AM
Fri, 20 Sep 2019 03:04 PM
inbox 32952
sent 4602
Name: label, dtype: int64
If you analyze the output, you'll see that we analyzed emails from Tue, 24 May 2011 11:04 AM, to Fri, 20 Sep 2019 03:04 PM. There were 32,952 emails received and 4,602 emails sent during this timeframe. That is a pretty good insight, right? Now, let's jump into the next question.
推薦閱讀
- 精通Nginx(第2版)
- 認識編程:以Python語言講透編程的本質
- 從0到1:HTML+CSS快速上手
- Mastering Kali Linux for Web Penetration Testing
- INSTANT Django 1.5 Application Development Starter
- 軟件測試技術指南
- Learning Concurrency in Kotlin
- Unity Character Animation with Mecanim
- Python一行流:像專家一樣寫代碼
- Android Studio開發實戰:從零基礎到App上線 (移動開發叢書)
- Java程序設計(項目教學版)
- 軟件測試項目實戰之功能測試篇
- jQuery EasyUI從零開始學
- Unity3D高級編程:主程手記
- Python數據科學實戰