Skip to content

Benjr.tw

  • Linux
    • Stress & Performance
    • Hardware Info
    • System Monitor
    • Security
    • Desktop
    • PXE
    • Filesystem Hierarchy Standard
    • Linux 開機選項
    • Linux Package Manager
    • 備份 Backup
  • Virtualization
    • Docker & Podman
    • CoreOS
  • NAS/SAN
  • Programming Language
    • Python
    • Bash shell script
    • Perl
    • PHP
    • Node.JS
    • VBA
    • javascript
    • Power Query
    • PowerShell
  • WordPress
  • DataBase
    • 資料庫安裝
    • 資料庫語法
    • SQLite
    • MariaDB JSON

Programming Language

Python Pandas – select_dtypes 與 dtypes

2023-03-102023-03-10 adminLinux, Python, RedHat / CentOS

Loading

測試環境為 CentOS 8 (虛擬機) 可以透過 select_dtypes 與 dtypes 函數來指定只顯示那種資料格式的欄位, Pandas 所使用的資料格式如下. 參考資料 – https://note.nkmk.me/en/python-pandas-dtype-astype […]

Read more

Python Pandas – merge 函數

2023-03-102023-03-10 adminLinux, Python, RedHat / CentOS

Loading

測試環境為 CentOS 8 (虛擬機) merge 函數就跟 SQL join 依樣可以將兩個資料表依據相對應的資料欄位合併起來. 安裝所需模組 匯入模組 參考範例 – https://levelup.gitconnected.com/20-pandas-functions-for-8 […]

Read more

Python Pandas – stack , transpose , melt 與 Pivot_table 函數

2023-03-102023-03-13 adminLinux, Python, RedHat / CentOS

Loading

測試環境為 CentOS 8 (虛擬機) 透過 Pandas 下面幾種函數將 行 (row) 與 列 (Column) 做轉置. 安裝所需模組 匯入模組 資料範例 stack 函數 transpose 函數 melt 函數 Pivot_table 函數 其中的 aggfunc (Aggregatio […]

Read more

Python Pandas – Aggregation Function & Groupby

2023-03-062023-03-10 adminLinux, Python, RedHat / CentOS

Loading

測試環境為 CentOS 8 (虛擬機) 參考資料 – https://medium.com/@b89202027_37759/%E5%AF%A6%E7%94%A8%E4%BD%86%E5%B8%B8%E5%BF%98%E8%A8%98%E7%9A%84pandas-dataframe% […]

Read more

Python pandas – read_csv 匯入空值

2023-03-022023-03-06 adminLinux, Python, RedHat / CentOS

Loading

測試環境為 CentOS 8 (虛擬機) pandas read_csv 匯入檔案時遇到空值時會幫忙填成 NaN (Not A Number 表示為未定義或是不可表示的值 ),可以使用以下方式來處理. 檔案範例 預設空值時會幫忙填成 NaN 透過 isnull() 函數可以檢視哪個資料 NaN (回 […]

Read more

Python – pandasql

2023-03-012023-03-01 adminLinux, Python, RedHat / CentOS

Loading

測試環境為 CentOS 8 (虛擬機) 參考資料 – https://towardsdatascience.com/pandasql-interesting-way-to-run-sql-queries-in-python-18a4fc36406a 通常使用 Python 時會將資料儲 […]

Read more

Python – Pandas + Matplotlib

2023-02-232023-02-23 adminLinux, Python, RedHat / CentOS

Loading

測試環境為 CentOS 8 (虛擬機) Pandas 的資料可以透過 Matplotlib 來繪圖. 下面以 CSV 格式為範例. 安裝所需模組 匯入模組 透過 DataFrame 物件將 csv 檔案轉換過來. 折線圖 長條圖 橫條圖 圓餅圖

Read more

Python Pandas – 檔案處理

2023-02-222023-03-06 adminLinux, Python, RedHat / CentOS

Loading

測試環境為 CentOS 8 (虛擬機) 參考資料 – https://blog.techbridge.cc/2020/09/21/python-pandas-zen-tutorial/ 下面以 股票 CSV 格式為範例. 安裝所需模組 匯入模組 透過 DataFrame 物件將 csv […]

Read more

Python – Pandas vs SQL

2023-02-222023-02-23 adminLinux, Python, RedHat / CentOS

Loading

測試環境為 CentOS 8 (虛擬機) 有快速可以對比 SQL 語法成 Python Pandas 程式嗎? 發現這一篇 – https://stackoverflow.com/questions/17071871/how-do-i-select-rows-from-a-datafra […]

Read more

Python Pandas – 變更與資料新增/刪除

2023-02-212023-03-09 adminLinux, Python, RedHat / CentOS

Loading

測試環境為 CentOS 8 (虛擬機) 參考資料 – https://ithelp.ithome.com.tw/articles/10251664 安裝所需模組 匯入模組 從網路抓的資料大多是 JSON 格式,下面就以此為範例. 使用索引名稱變更值 DataFrame.loc[&#82 […]

Read more

文章導覽

較舊的文章
較新的文章

近期文章

  • Windows – Network Sharing + Port forwarding to VM
  • Ansible – gather facts
  • Ansible – host_vars 定義特定的變量
  • Ansible 範例 – Chrony daemon
  • Ubuntu NTP Client 校時設定

近期留言

  • 「Jackson2734」於〈Ubuntu NTP Client 校時設定〉發佈留言
  • 「w」於〈Ubuntu 16.04 Server PXE 安裝〉發佈留言
  • 「admin」於〈TCP/IP 常見封包〉發佈留言
  • 「stu」於〈TCP/IP 常見封包〉發佈留言
  • 「student」於〈Linux command – tcpdump〉發佈留言

分類

其他操作

  • 登入
  • 訂閱網站內容的資訊提供
  • 訂閱留言的資訊提供
  • WordPress.org 台灣繁體中文
  • Privacy Policy
  • 隱私權政策
Powered by WordPress | Theme: Astrid by aThemes.