public class DataFrameFactory extends Object
DataFrame
object.Modifier | Constructor and Description |
---|---|
protected |
DataFrameFactory() |
Modifier and Type | Method and Description |
---|---|
static <R,V> DataFrame<R,Object,V> |
fromColumnSeries(Series<R,V>... series)
Creates a data frame using a combination of series.
|
static MutableDataFrame<Integer,String,Object> |
fromCSV(URL url)
Creates a data frame by loading a Comma-Separated Values (CSV) encoded file.
|
static MutableDataFrame<Integer,String,Object> |
fromExcel(URL url)
Creates a data frame by loading an Excel (.xls, .xlsx) file.
|
static MutableDataFrame<Integer,String,Object> |
fromJSON(URL url)
Creates a data frame by loading a JSON encoded file.
|
static DataFrame<Integer,String,Object> |
fromMySQL(String url,
String username,
String password,
String query)
Creates a data frame by retrieving the result of a query made to a MySQL database.
|
static DataFrame<Integer,String,Object> |
fromOracle(String url,
String username,
String password,
String query)
Creates a data frame by retrieving the result of a query made to an Oracle database.
|
static DataFrame<Integer,String,Object> |
fromPostgreSQL(String url,
String username,
String password,
String query)
Creates a data frame by retrieving the result of a query made to a PostgreSQL database.
|
static <V> MutableDataFrame<Integer,String,V> |
fromRowMajorArray(String[] names,
Class[] classes,
V[][] data)
Creates a data frame using a row-major two dimensional array.
|
static DataFrame<Integer,String,Object> |
fromSQLServer(String url,
String username,
String password,
String query)
Creates a data frame by retrieving the result of a query made to a Microsoft SQL Server database.
|
static MutableDataFrame<Integer,String,Object> |
fromTSV(URL url)
Creates a data frame by loading a tab-delimited encoded file.
|
static DataFrameFactory |
getInstance() |
static SwingDataFrameFactory |
getSwingInstance() |
public static DataFrameFactory getInstance()
public static SwingDataFrameFactory getSwingInstance()
public static <R,V> DataFrame<R,Object,V> fromColumnSeries(Series<R,V>... series)
R
- the type of row keys maintained used to query this data frame.V
- the type of valuesseries
- the series to combinepublic static <V> MutableDataFrame<Integer,String,V> fromRowMajorArray(String[] names, Class[] classes, V[][] data)
V
- the type of valuesnames
- the column namesclasses
- the type of values hold by each columndata
- the data arraypublic static MutableDataFrame<Integer,String,Object> fromCSV(URL url) throws IOException
url
- the URL of the fileIOException
public static MutableDataFrame<Integer,String,Object> fromTSV(URL url) throws IOException
url
- the URL of the fileIOException
public static MutableDataFrame<Integer,String,Object> fromExcel(URL url) throws IOException
url
- the URL of the fileIOException
public static MutableDataFrame<Integer,String,Object> fromJSON(URL url) throws IOException
url
- the URL of the fileIOException
public static DataFrame<Integer,String,Object> fromMySQL(String url, String username, String password, String query) throws IOException, SQLException
url
- the JDBC URL, e.g. "jdbc:mysql://mysql.example.com:3306/mydatabase"username
- the username to authenticate the connectionpassword
- the password to authenticate the connectionquery
- the SQL query to submit, e.g. "SELECT * FROM mytable";IOException
SQLException
public static DataFrame<Integer,String,Object> fromPostgreSQL(String url, String username, String password, String query) throws IOException, SQLException
url
- the JDBC URL, e.g. "jdbc:postgresql://mysql.example.com/mydatabase"username
- the username to authenticate the connectionpassword
- the password to authenticate the connectionquery
- the SQL query to submit, e.g. "SELECT * FROM mytable";IOException
SQLException
public static DataFrame<Integer,String,Object> fromOracle(String url, String username, String password, String query) throws IOException, SQLException
url
- the JDBC URL, e.g. "jdbc:oracle:thin://oracle.example.com/mydatabase"username
- the username to authenticate the connectionpassword
- the password to authenticate the connectionquery
- the SQL query to submit, e.g. "SELECT * FROM mytable";IOException
SQLException
public static DataFrame<Integer,String,Object> fromSQLServer(String url, String username, String password, String query) throws IOException, SQLException
url
- the JDBC URL, e.g. "jdbc:sqlserver://sqlserver.example.com/mydatabase"username
- the username to authenticate the connectionpassword
- the password to authenticate the connectionquery
- the SQL query to submit, e.g. "SELECT * FROM mytable";IOException
SQLException
Copyright © 2014 Macrofocus GmbH. All Rights Reserved.