1
我期待在我的熊貓df中找到最長的零串。我有一個有10列的df數組,每列有25000行,它們有一個空值,一個零值或一個非零數字。我期待計算:如何查找熊貓數據幀中最長的連續字符串值
1. A value which states the longest consecutive number
of zeros in each column for all the columns.
2. A value which states the longest consecutive number
of zeros AND nulls in each column for all the columns.
例如,如果第一列是:
[col1:1,2,4,5,6,2,3,0,0,0,0,1,2,... (remaining all numbers)]
將返回4.
感謝
什麼你嘗試了嗎? – Netwave