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
> argv = arg_split(arg_str, posix, strict)
> print(arg_str)
_ = [s.count('. ') for s in df['document'].tolist()]
> print(argv)
['_', '=', "[s.count('.", "') for s in df['", "document'].tolist()]"]
And thenargs = ' '.join(args) will join with an extra space.
Also changing my command from _ = [s.count('. ') for s in df['document'].tolist()] to _ = [s for s in df['document'].tolist()] removes the problem so there might be a problem with the .count('. ').
The text was updated successfully, but these errors were encountered:
Hi,
I think there is a bug with the
parse_options
method in the sense that it modifies the input statement which causes a bug in my application.Repro
In jupyter notebook, when iterating over my dataframe, I tried to time the operation with the
timeit
magic:Note the key that was transformed from
'document'
in my code to' document'
at execution time.This happens in the
parse_options
methodipython/IPython/core/magics/execution.py
Line 1077 in a6082c6
When dropping into pdb, I get the following:
and within
parse_options()
, I guess it happens when splitting the line witharg_split
and then joining back with spacesAnd then
args = ' '.join(args)
will join with an extra space.Also changing my command from
_ = [s.count('. ') for s in df['document'].tolist()]
to_ = [s for s in df['document'].tolist()]
removes the problem so there might be a problem with the.count('. ')
.The text was updated successfully, but these errors were encountered: