You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
would output http:\\example.com\?b=2&a=100, instead
Although http:\\example.com\?a=100&b=2 is equivalent to http:\\example.com\?b=2&a=100 according to the the standards, in practice, it is useful to keep order when you end with millions of URLs and you want to keep things organized for data processing. I currently have a pandas dataframe (df) in which I use apply to modify a subset of rows with apply:
It would be great if there would be a replace method, so that:
would output:
http:\\example.com\?a=100&b=2
A remove and add would change the order of things:
would output
http:\\example.com\?b=2&a=100
, insteadAlthough
http:\\example.com\?a=100&b=2
is equivalent tohttp:\\example.com\?b=2&a=100
according to the the standards, in practice, it is useful to keep order when you end with millions of URLs and you want to keep things organized for data processing. I currently have a pandas dataframe (df
) in which I use apply to modify a subset of rows with apply:However, this would change the "order" of the URL in the subset of criteria, as compared to all the rest.
so, I created the following function to circumvent the problem:
I know the internals of
furl
could easily support thereplace
function, so this should be fairly easy to implement.The text was updated successfully, but these errors were encountered: