当我在它们周围徘徊时,我可以看到匹配的括号高亮为绿色,但是可以向它们添加其他颜色语法,以便匹配的括号具有不同的颜色。
示例代码:
# create new features
df = (df
.withColumn(("rooms_per_hh", F.round(col('total_rooms') / col('households'), 2)))
.withColumn(("pop_per_hh", F.round(col('pop') / col('households'), 2)))
.withColumn(("bedrooms_per_rooms", F.round(col('total_bedrooms') / col('total_rooms'), 2)))
)
我喜欢在这里看到不同颜色的不同括号。
相关链接:-Changing jupyter's matching parenthesis color-Replace / remove highlighting in Jupyter Notebook with custom theme