问题描述
让我们使用此功能
import pandas as pd
a=['Jimmy French','Casey Fryer','Jane Pickens','Tommy L. Garcetti','Nada Lewis']
df=pd.DataFrame(a)
df.to_csv('output_file.csv',index=False,header=None)
其中def hello():
<Empty Line>
<T> print("Hello")
<Empty Line>
<Empty Line>
<S> print("World")
用于制表符缩进,<T>
用于空格缩进,<S>
是空行。如果我调用此函数,它将返回<Empty Line>
错误。我已经尝试使用黑色Inconsistent indentation
格式化该函数,这也会产生相同的错误。我想将上述函数格式化为使用黑色的空格缩进行。
black filename.py
如果不可能,有什么办法可以将空行缩进空格?
来自
def hello():
<S>
<S> print("Hello")
<S>
<S>
<S> print("World")
收件人
def hello():
<Empty Line>
<S> print("Hello")
<Empty Line>
<Empty Line>
<S> print("World")
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)