我一直在网上搜索current_week的正确postgreSQL语法.我搜索了所附的链接但是没有得到任何结果日期/时间.我的任务是将星期日作为本周的开始.
我尝试了与current_date相同但失败了:
select current_week
Run Code Online (Sandbox Code Playgroud)
postgreSQL必须有当前的一周语法.
尝试更改缩写地址以完整描述结束,但回溯没有任何意义.请告诉我这里我做错了什么.
import pandas as pd
edit = pd.read_csv('mycsvfile')
edit['Home'] = edit['Home'].apply(lambda s: s.replace('Ct', 'Court'))
edit['Home'] = edit['Home'].apply(lambda s: s.replace('Rd', 'Road'))
edit['Home'] = edit['Home'].apply(lambda s: s.replace('Ln', 'Lane'))
edit.to_csv('newcsvfile',index = False)
Run Code Online (Sandbox Code Playgroud)
Traceback (most recent call last):
File "C:\Users\.py", line 20, in <module>
edit['Home'] = edit['Home'].apply(lambda s: s.replace('Ct', 'Court'))
File "C:\********.py", line 2294, in apply
mapped = lib.map_infer(values, f, convert=convert_dtype)
File "pandas\src\inference.pyx", line 1207, in pandas.lib.map_infer (pandas\lib.c:66124)
File "C:******.py", , in <lambda>
edit['Home'] = edit[Home'].apply(lambda s: s.replace('Ct', 'Court'))
AttributeError: 'float' object has no …Run Code Online (Sandbox Code Playgroud)