作者查詢 / robert09080
作者 robert09080 在 PTT [ Python ] 看板的留言(推文), 共98則
限定看板:Python
看板排序:
2F→: thread07/03 13:33
2F推: I’d max08/13 10:10
3F→: 第一行要略過吧?skiprows=106/27 09:15
1F→: Rlock 試試?04/01 11:21
1F→: Context Manager12/27 10:2:q
3F→: df.loc[df[failure]>10, high].max()08/15 22:18
3F推: df.loc[]08/09 18:59
12F推: You can use list comprehension, here we have a04/29 17:18
13F→: list L, L=[20,39,41,85,11], L2=[x+10 if x<40 el04/29 17:18
14F→: se x-5 if x>40 else x for x in L], and df[‘B’04/29 17:18
15F→: ]=L204/29 17:18
11F→: 不忍噓,用一堆if else 可以寫04/17 11:11
1F推: 這不是一個很好的寫法,因為你使用t2做迴圈,又刪除02/24 11:57
2F→: t2中的元素02/24 11:57
3F→: 請用 list comprehensive,[x for x in t2 if x no02/24 11:58
4F→: t in t1]02/24 11:58
5F→: 或是可以使用set,set(t2)-set(t1)02/24 12:00