我想通过使用In [61]:
import io
import pandas as pd
pd.read_csv(io.StringIO(t), delim_whitespace=True, header=None)
t="""1095 20 27595 14.1 106.4 191 1 0 0 0 6.998509 10.22539
1001 32 9958 10.9 -30.6 13 1 0 0 0 6.908755 9.206132
1122 9 6125.9 23.5 -16.3 14 1 0 0 0 7.022868 8.720281
578 -9 16246 5.9 -25.7 -21 1 0 0 0 6.359574 9.695602"""
pd.read_csv(io.StringIO(t), delim_whitespace=True, header=None)
Out[61]:
0 1 2 3 4 5 6 7 8 9 10 11
0 1095 20 27595.0 14.1 106.4 191 1 0 0 0 6.998509 10.225390
1 1001 32 9958.0 10.9 -30.6 13 1 0 0 0 6.908755 9.206132
2 1122 9 6125.9 23.5 -16.3 14 1 0 0 0 7.022868 8.720281
3 578 -9 16246.0 5.9 -25.7 -21 1 0 0 0 6.359574 9.695602
语句声明变量来在PL / SQL中创建存储过程。我该如何创建呢?
我的存储过程类似于
In [62]:
pd.read_fwf(io.StringIO(t), header=None)
Out[62]:
0 1 2 3 4 5 6 7 8 9 10 11
0 1095 20 27595.0 14.1 106.4 191 1 0 0 0 6.998509 10.225390
1 1001 32 9958.0 10.9 -30.6 13 1 0 0 0 6.908755 9.206132
2 1122 9 6125.9 23.5 -16.3 14 1 0 0 0 7.022868 8.720281
3 578 -9 16246.0 5.9 -25.7 -21 1 0 0 0 6.359574 9.695602
以上代码向我显示错误。请帮忙。感谢
答案 0 :(得分:0)
添加into GROUP1
确保它返回1行,并且group具有相同的数据类型,我还建议添加例外。
这样做
CREATE PROCEDURE ValueFinders
(REGION1 IN VARCHAR2(32 Byte),CONFIG1 IN VARCHAR2(128 Byte))
DECLARE GROUP1 VARCHAR2(128 Byte);
BEGIN
-- SET GROUP1:= Select GROUP from PRODUCTINFO where REGION=REGION1 AND CONFIG=CONFIG1;
Select GROUP into GROUP1 from PRODUCTINFO where REGION=REGION1 AND CONFIG=CONFIG1;
-- select * from DEAL where GROUP=GROUP1;
END