跳到主要內容

Trip for Google Cloud Next '24

Google Cloud Next '24 has a packed schedule. As Google Cloud experts shared incisive speeches and held some brief discussions with them, we deeply felt that artificial intelligence is being further integrated into our daily life and work.

(It is really tiring after flying more then 10 hours...)



留言

這個網誌中的熱門文章

Rust - Polars 資料欄位型態轉換,從 str 變 Date

緣起 Polars 是一個以 Rust 語言開發的 「DataFrame」 新興套件,它可以同時在 Rust 及 Python 中使用。Polars 憑藉著 Rust 的執行速度為基礎,讓它在資料處理的領域中, 逐漸流行起來。 但正由於它還在發展初期,目前網路上的參考文章相對較少,中文的內容更是稀有;所以整理了一下這週末的一些研究心得,一來避免自己忘記,二來也在網路上與大家分享,希望慢慢的能讓 Rust 的中文資源可以越來越完整,有朝一日可以在華人世界中流行起來。 本文開始 本週研究的主題是 Polars 裡,對「DataFrame」某個「str」欄位,進行資料型別轉換為「Date」或「Datetime」。資料的轉換可以有多種方式,應該不只限於接下來提到的方法。 建立第一個資料集 為了開始這個操作,我們需要先建立起一個「DataFrame」。 let date = Series :: new ( "trans_date" , & [ "2023-05-01" , "2023-05-02" , "2023-05-03" , "2023-05-04" , "2023-05-05" , ]); let df = DataFrame :: new ( vec ! [ date ]); println ! ( " { } " , df . clone () . collect () ? );   執行後, 可以看到以下的結果:  shape: (5, 1) ┌────────────┐ │ trans_date │ │ ---        │ │ str        │ ╞════════════╡ │ 2023-05-01 │ │ 2023-05-02 │ │ 2023-05-03 │ │ 2023-05-04 │ │ 2023-05-05 │ └────────────┘ 從執行的結果中,我們可以清楚的看到,目前所建立的「DataFrame」,在「trans_date」的欄位中,...

PROJECT 365, #221

2009-08-23 @ 北投溫泉博物館 Information: Camera: Nikon F3HP Lens: Tokina 70-210mm/f4-5.6 Film: Fujifilm X-TRA 400

PROJECT 365, #154

2009-06-17 @ Yonghe, Taipei Information: Camera: Nikon F3HP Lens: Nikkor AF 50mm/f1.8D Film: Agfaphoto APX 100 Developer: Kodak D-76, Stock, 20 degree C, 9min