--

Hi Bhavin,

thank you for point this out, since I was not aware of it. I tried it with a code example in this article.

One little thing to consider is, that after the backslash no character must follow. Not even a blank space character.

Thank you again,

Gregor

Code using the brackets ( )

```

(

melb

.query("Distance < 2")

.filter(["Type", "Price"])

.groupby("Type")

.agg("mean")

.reset_index()

.set_axis(["Type", "averagePrice"], axis = 1, inplace = False)

```

Code using the backslash \

```

melb \

.query("Distance < 2") \

.filter(["Type", "Price"]) \

.groupby("Type") \

.agg("mean") \

.reset_index() \

.set_axis(["Type", "averagePrice"], axis = 1, inplace = False)

```

--

--

Dr. Gregor Scheithauer
Dr. Gregor Scheithauer

Written by Dr. Gregor Scheithauer

Gregor Scheithauer is a consultant, data scientist, and researcher. https://gscheithauer.medium.com/membership

No responses yet