1 2 3 4 5 6 7 8 9 10 11 12
#!/usr/bin/python3 import pandas import sys from math import pi l = 23.5 b=pandas.read_csv("/dev/stdin", sep="\t") b.index.name = "idx" b["x"] = (b["y"]/13*l) b["omega"] = ((9.81/b["l"])**(1/2)) b["f"] = (b["omega"]*0.5/pi) b = b.astype(float).round(6); b.to_csv("/dev/stdout", sep=sys.argv[1][0]);