import static io.deephaven.csv.CsvTools.readCsv
import static io.deephaven.csv.CsvTools.writeCsv
import io.deephaven.csv.CsvSpecs
source = emptyTable(100).update(
"X = 0.1 * i",
"SinX = X % 0.2 < 0.01 ? NULL_DOUBLE : sin(X)",
"CosX = cos(X)",
"TanX = tan(X)"
)
writeCsv(source, "/data/TrigFunctions.csv")
writeCsv(source, "/data/Cosine.csv", "X", "SinX")
result = readCsv("/data/TrigFunctions.csv")
iris = readCsv("https://media.githubusercontent.com/media/deephaven/examples/main/Iris/csv/iris.csv")
specs = CsvSpecs.builder().hasHeaderRow(false).build()
deniroDefault = readCsv("https://media.githubusercontent.com/media/deephaven/examples/main/DeNiro/csv/deniro_headerless.csv", specs)
specs = CsvSpecs.builder().delimiter('\t' as char).build()
deniroTSV = readCsv("https://raw.githubusercontent.com/deephaven/examples/main/DeNiro/csv/deniro.tsv", specs)
specs = CsvSpecs.builder().delimiter('|' as char).build()
deniroPSV = readCsv("https://raw.githubusercontent.com/deephaven/examples/main/DeNiro/csv/deniro.psv", specs)
import static io.deephaven.csv.CsvTools.readCsv
import io.deephaven.csv.CsvSpecs
headers = List.of("Year", "Score", "Title")
specs = CsvSpecs.builder().hasHeaderRow(false).headers(headers).build()
deniroHeader = readCsv("https://media.githubusercontent.com/media/deephaven/examples/main/DeNiro/csv/deniro_headerless.csv", specs)