小编use*_*232的帖子

PostgreSQL计算行之间的差异

我尝试使用查询计算字段中行之间的差异:

Illustrations:
input:year,month,fixes
output:increase

     year | month | fixes    | increase
    ------+-------+----------+-----------
     2006 | 04    |       1  | 0
     2006 | 05    |       4  | 3
     2006 | 06    |       3  | -1

通过修复中相邻行之间的差异来增加列作为输出.

sql postgresql

27
推荐指数
1
解决办法
2万
查看次数

在python中创建两个csv文件的笛卡尔积(交叉连接)

我试图通过交叉连接两个现有的csv文件来创建一个新的csv文件.

csv文件#1:

hour    Elevation   Azimuth x   y   z   sunx    suny    sunz
06:29:00    -0.833  67.72   0.379094033 0.925243946 -0.014538068    0.379094033 0.925243946 -0.014538068
07:00:00    6.28    68.75   0.360264063 0.92641472  0.109387255 0.360264063 0.92641472  0.109387255
Run Code Online (Sandbox Code Playgroud)

csv文件#2:

ID  SURFACES    A1X A1Y A1Z A2X A2Y A2Z B1X B1Y B1Z B2X B2Y B2Z AX  AY  AZ  BX  BY  BZ  ABX ABY ABZ planex  planey  planez
1   GROUND  800085.3323 961271.977  -3.07E-18   800080.8795 961246.1978 -3.07E-18   800097.1572 961269.9344 -3.07E-18   800085.3323 961271.977  -3.07E-18   4.4528  25.7792 0.00E+00    11.8249 -2.0426 0.00E+00    0   0   -313.9317514    0 …
Run Code Online (Sandbox Code Playgroud)

python csv

0
推荐指数
1
解决办法
2696
查看次数

标签 统计

csv ×1

postgresql ×1

python ×1

sql ×1