我在 Centos 7 中使用 Airflow,使用 Python 3.7。
当我通过 BashOperator 运行 Bash 命令时,我遇到了以下问题:
[2019-11-13 23:20:08,238] {taskinstance.py:1058} ERROR - [Errno 2] No such file or directory: 'bash': 'bash'
Traceback (most recent call last):
File "/home/airflow/virtualenvs/airflow_env/lib/python3.7/site-packages/airflow/models/taskinstance.py", line 930, in _run_raw_task
result = task_copy.execute(context=context)
File "/home/airflow/virtualenvs/airflow_env/lib/python3.7/site-packages/airflow/operators/bash_operator.py", line 120, in execute
preexec_fn=pre_exec)
File "/home/airflow/python/Python-3.7.5/Lib/subprocess.py", line 800, in __init__
restore_signals, start_new_session)
File "/home/airflow/python/Python-3.7.5/Lib/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'bash': 'bash'
Run Code Online (Sandbox Code Playgroud)
是否有我需要传递给 BashOperator 以便它知道要查找的变量/bin/bash?在源代码中,BashOperator …
有没有办法用Pandas数据帧重复行标签?使用xlsxwriter创建的Excel输出当前不会在更高级别重复分组.我感谢任何帮助.
我的Excel工作表现在如何:
Country State/Province Population
US Califonia 38,802,500
Texas 26,956,958
Florida 19,893,297
...
CAN Alberta 3,645,257
Manitoba 4,400,057
Run Code Online (Sandbox Code Playgroud)
我希望输出有重复的国家级标签,如下所示
Country State/Province Population
US California 38,802,500
US Texas 26,956,958
US Florida 19,893,297
...
CAN Alberta 3,645,257
CAN Manitoba 4,400,057
Run Code Online (Sandbox Code Playgroud)