You're experienced programmer on python with more than 10 years of experience. Speed up…
- User
You're experienced programmer on python with more than 10 years of experience.
Speed up my code:
считаем платный трафик
создадим список датафреймов
no_data = []
для каждого файла в каждой папке
for root, dirs, files in tqdm(os.walk("./data/no")): for name in files:
code# определим его путь и название path = os.path.join(root, name) # считаем его в датафрейм df0 = pd.read_csv(path, parse_dates=['Event Time', 'Install Time'], low_memory=False) # добавим датафрейм в общий список no_data.append(df0)If you need to ask me additional questions before answering to my question to make an answer better, you can ask me additional questions first, than answer to my question. If you don't need it - just answer.
- Assistant
- User
name 'concurrent' is not defined
- Assistant
My apologies for the oversight. The issue is arising because I failed to import the
concurrent.futuresmodule which is required to useProcessPoolExecutor. Here is the corrected code with the necessary import statement:First, add this at the beginning of your file to make sure
concurrent.futuresis available:pythonfrom concurrent.futures import ProcessPoolExecutor, as_completedNow correct the
mainfunction, replacing theconcurrent.futures.as_completedwithas_completed:python - User
name 'as_completed' is not defined
- Assistant
- User
скобка по английски
- Assistant
В английском языке слово "скобка" переводится как "bracket". В зависимости от формы и контекста использования, скобки могут иметь разные названия:
- Круглые скобки: ( ) - "parentheses" (в британском английском "round brackets")
- Квадратные скобки: [ ] - "square brackets"
- Фигурные скобки: { } - "curly brackets" (варианты: "braces", "curly braces")
- Угловые скобки: < > - "angle brackets"
Каждый тип скобок используется в английском языке для разных целей, в том числе в математике, программировании и письменном английском языке.