作者查詢 / celestialgod

總覽項目: 發文 | 留言 | 暱稱
作者 celestialgod 在 PTT [ Python ] 看板的留言(推文), 共75則
限定看板:Python
[問題] DataFrame資料更改
[ Python ]16 留言, 推噓總分: +8
作者: FantasyChopi - 發表於 2022/05/21 15:47(3年前)
2Fcelestialgod: .map05/21 16:19
9Fcelestialgod: var_dict = {“cat”: 0, “dog”: 1}05/22 19:25
10Fcelestialgod: df[‘var’] = df[‘var’].map(var_dict)05/22 19:25
11Fcelestialgod: var_dict = {“yes”: 0, “no”: 1}05/22 19:26
12Fcelestialgod: 這就可以把yes/no map to 1/005/22 19:26
15Fcelestialgod: df[‘var’] = df[‘var’].map({‘是’:1,’否’05/22 22:33
16Fcelestialgod: :0})05/22 22:33
[問題] 搭建pip-server
[ Python ]8 留言, 推噓總分: +2
作者: ctr1 - 發表於 2022/05/12 21:57(3年前)
4Fcelestialgod: 我之前是用Apache HTTP server 你只要建好目錄就可05/14 18:43
5Fcelestialgod: 以使用了05/14 18:43
6Fcelestialgod: https://tinyurl.com/5ubr2du705/14 18:45
8Fcelestialgod: 忘了說 Apache的話 只有下載功能而已 沒有publish05/16 18:29
[問題] 迭代次數太高,字典問題
[ Python ]22 留言, 推噓總分: +6
作者: qaz28787493 - 發表於 2022/05/13 08:59(3年前)
17Fcelestialgod: 試試看Cython Linux只要裝好g++ pythondev windows05/17 13:05
18Fcelestialgod: 比較麻煩要裝VC++ 但是效能應該可以好很多05/17 13:05
19Fcelestialgod: https://tinyurl.com/yusbeekf05/17 13:07
20Fcelestialgod: 我那時候把Python改成Cython快了10倍以上05/17 13:07
[問題] Api到DB的即時資料串流
[ Python ]3 留言, 推噓總分: +1
作者: ms0344303 - 發表於 2022/04/13 11:33(3年前)
1Fcelestialgod: AWS lambda, Azure Functions, Azure Logic App04/13 12:17
[問題] 是否可以將nunpy語法轉為c++
[ Python ]16 留言, 推噓總分: +6
作者: jack155861 - 發表於 2022/01/27 16:46(4年前)
1Fcelestialgod: 不考慮numpy+Cython嗎?01/27 17:40
2Fcelestialgod: https://reurl.cc/k7lD3x01/27 17:41
3Fcelestialgod: 如果不考慮這麼複雜的方式 建議直接用armadillo重寫01/27 17:44
4Fcelestialgod: https://reurl.cc/dX76kg01/27 17:48
5Fcelestialgod: 雖然上面那篇是從matlab改C++但是numpy也同理01/27 17:49
16Fcelestialgod: 轉完之後可以01/28 10:17
[問題] pyodbc用DataFrame當其中一個Table
[ Python ]12 留言, 推噓總分: +3
作者: duncanfun - 發表於 2021/03/24 20:35(4年前)
4Fcelestialgod: https://reurl.cc/e9n3pM How about temp table?03/25 16:38
5Fcelestialgod: create a temp table in db and join it with03/25 16:39
6Fcelestialgod: your table03/25 16:39
7Fcelestialgod: 阿沒看到不插入資料下....03/25 16:40
[問題] cython 轉C code 請益
[ Python ]4 留言, 推噓總分: 0
作者: acoupleof123 - 發表於 2020/09/26 10:56(5年前)
4Fcelestialgod: 可以考慮armadillo, GSL等轉換會簡單很多09/28 13:52
[問題] pandas multiindex 取最後一筆
[ Python ]4 留言, 推噓總分: 0
作者: PTTleader - 發表於 2018/08/26 22:43(7年前)
1Fcelestialgod: sort by id, NO (descending) 然後group by id取08/27 01:14
2Fcelestialgod: 一筆08/27 01:14
3Fcelestialgod: https://pastebin.com/pcqXhLFt08/27 01:20
[問題] numpy broadcasting 矩陣特定位置運算
[ Python ]6 留言, 推噓總分: +1
作者: NMOSFET - 發表於 2018/08/25 22:34(7年前)
1Fcelestialgod: https://pastebin.com/GykDhbj208/25 22:42
5Fcelestialgod: 還可以直接試試看迴圈用numba.jit... 快很多XD08/26 00:56
[問題] groupby 效能改進
[ Python ]12 留言, 推噓總分: +2
作者: f496328mm - 發表於 2018/03/25 19:02(8年前)
1Fcelestialgod: https://goo.gl/1gYJgh03/25 19:42
2Fcelestialgod: https://goo.gl/Mv5nTX groupby字串的看起來還可以03/25 22:09
3Fcelestialgod: Test 403/25 22:10
4Fcelestialgod: by int或是numeric 就滿悲劇的XDD03/25 22:10
5Fcelestialgod: 所以你說Python一定比較快 恩... 應該還是不一定03/25 22:11
6Fcelestialgod: 而且data.table的測試指出pandas記憶體用太多03/25 22:12
7Fcelestialgod: 在dplyr, data.table沒爆的情況下,pandas爆了03/25 22:13
10Fcelestialgod: trace了一下issue,2E9列,pandas會爆掉那個已經fix03/25 22:18