Skip to content
Advertisement

Category: Questions

Find and replace no updating values

I’m writing a script that combine csv into one and then do a find an replace for specific formatting and ask the user to correct the ones that not match. The output is not on the right csv format It should be Answer This problems has a number of different parts, and you’ve made a good attempt :) I recommend

Error when retrieving nested list values in python

I have this as my code right now main.py: It returns the first list, but not the second one. Traceback: How do I fix this? Answer Found a fix: If the count is a multiple of 2, it is skipped (to prevent printing twice). If the count is equal to the amount of commands, the iteration is stopped.

how to have re.sub work for multiple pattern replace on list of list?

I have a list of list input- old_list: my desired output – new_list: and I have tried 1. and replace(new_list, old, new) for … but none of them works, the output is the same as the original old_list. Any suggestions? Thanks! Answer You need to use output of each iteration as input for a next iteration, i.e. in new_list instead

TypeError: argument of type ‘float’ is not iterable. Trying to find rows which doesn’t contain specific words in pandas dataframe

My dataframe looks like this(not exactly, but here is the sample): and I’m trying to find rows only have ‘word’ but without ‘not’ here is my code: and I’m getting this error: I don’t understand why I’m getting this error cause df3[‘WARNSIGN_DTL’] column is string type, not float Answer Use parentheses when you use ‘&’ conditions. Change it from :

ValueError: There is no such driver by url (chromedriver_mac64_m1.zip)

I’m running a script with Selenium but just a couple days ago I started to receive the error below: I’ve tried to do some research on GitHub back can’t figure out the error https://github.com/SergeyPirogov/webdriver_manager/issues/443 Answer Because google has changed the link to chromedriver for apple silicon macs, It seems that the new link is https://chromedriver.storage.googleapis.com/106.0.5249.61/chromedriver_mac_arm64.zip, and the maintainer of webdriver-manager

Advertisement