databricks / koalas

Koalas: pandas API on Apache Spark
Apache License 2.0
3.32k stars 356 forks source link

Support Series.str.len() #2140

Closed RainFung closed 3 years ago

RainFung commented 3 years ago
df['col_sum'] = df['col'].str.slice(2, 2+7).replace('0', '').len()
AttributeError: 'Series' object has no attribute 'len'
LSturtew commented 3 years ago

Series.str.len() is already implemented: https://github.com/databricks/koalas/blob/0fd088e9f142177ef2a80b41d095a49c40320b2a/databricks/koalas/strings.py#L1244-L1276

RainFung commented 3 years ago

Thanks.