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

admin

Python – Pexpect 套件

2023-03-152023-03-15 adminLinux, Python, RedHat / CentOS

Loading

測試環境為 CentOS 8 x86_64 (虛擬機) Pexpect 使用上蠻像之前常用的 TeraTerm Marco – https://benjr.tw/20386 , 透過 Pexpect 套件可以跟其他程式互動,基本上就3個動作 呼叫程式. 等待程式關鍵字. 傳送字串. 安裝 […]

Read more

Python – paramiko 套件

2023-03-142023-03-15 adminLinux, Python, RedHat / CentOS

Loading

測試環境為 CentOS 8 x86_64 (虛擬機) paramiko 套件允許我們可以透過 SSH 連線方式來執行遠端機器的程式. 安裝所需套件. 使用密碼方式進行連線 執行結果 程式說明: 匯入 paramiko 套件 後面 connect 函數所需參數. 建立 paramiko 物件. se […]

Read more

Python – List Object Finding duplicates

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

Loading

測試環境為 CentOS 8 (虛擬機) 找出 List 物件中重複的字串,參考文章 – https://www.trainingint.com/how-to-find-duplicates-in-a-python-list.html . 程式 執行結果

Read more

Python Pandas – Filter 函數

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

Loading

測試環境為 CentOS 8 (虛擬機) 參考資料 – https://pandas.pydata.org/pandas-docs/version/0.19/generated/pandas.DataFrame.filter.html 透過 filter 函數搭配 regex (標準表示式) 可以依 […]

Read more

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

文章導覽

較舊的文章
較新的文章

近期文章

  • MariaDB – Remove repeated words in string
  • Python
  • MariaDB – Thread Pool
  • MariaDB – Condition Group
  • MariaDB – String Split using CTE

近期留言

  • 「MMM」於〈Windows – Fio〉發佈留言
  • 「UQA」於〈Linux – EFI 的磁碟分區〉發佈留言
  • 「[mysql] | 飛狼實驗室[wp]」於〈MariaDB 資料庫 – 使用者密碼〉發佈留言
  • 「菜单加密码」於〈Windows command – BCDEdit〉發佈留言
  • 「N/A」於〈Linux – iperf (Bind to host)〉發佈留言

分類

其他操作

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