Skip to content
Advertisement

What is pandas equivalent of the following SQL?

OK, I have a dataframe that looks like the following:

JavaScript

In SQL, to filter unique segments (segment_id) by travelmode I will do:

JavaScript

What is the pandas equivalent of this expression?

Advertisement

Answer

Maybe:

JavaScript

as suggested in this post.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement