NPE When Using Table.read().csv()
See original GitHub issueUsing a super basic example provided on tablesaw page I ran across, I get a NPE:
String location =
"https://raw.githubusercontent.com/jtablesaw/tablesaw/master/data/bush.csv";
try (InputStream input = new URL(location).openStream()) {
Table table = Table.read().csv(input, "test"); // <-- line 39 in stack trace
Plot.show(TimeSeriesPlot.create("Fox approval ratings", table, "date", "approval"));
}
Exception in thread "main" java.lang.NullPointerException
at java.io.FileInputStream.<init>(FileInputStream.java:130)
at tech.tablesaw.io.csv.CsvReader.getColumnTypes(CsvReader.java:208)
at tech.tablesaw.io.csv.CsvReader.read(CsvReader.java:121)
at tech.tablesaw.io.DataFrameReader.csv(DataFrameReader.java:62)
at tech.tablesaw.io.DataFrameReader.csv(DataFrameReader.java:58)
at tech.tablesaw.io.DataFrameReader.csv(DataFrameReader.java:50)
at com.example.main(Test.java:39)
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
java.lang.NullPointerException exception while reading csv file
I'm trying to calcule the distance and travel time between origins and destinations using the distance matrix API. I used the following code...
Read more >Csv does not exist or could not be read NullPointerException
I have a .csv file with coordinates information that I want to draw. ... getRowCount() + " total rows in table"); for (TableRow...
Read more >What Happens behind the Scenes with Spark - Manning
SparkSession spark = SparkSession.builder() . ... At t 4, each task continues by reading a part of the CSV file as illustrated in...
Read more >Spark Replace NULL Values on DataFrame
DataFrame API provides DataFrameNaFunctions class with fill() function to ... Before we start, Let's read a CSV into Spark DataFrame file, ...
Read more >Read CSV fails with null pointer exception
The error thar rapid miner shows is: The setup does not seem to contain any obvius error, and in the log says: Log...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
fixed
I’ve released a new version with this fix