@@ -56,7 +56,8 @@ class DataScan:
5656 Parameters
5757 ----------
5858 data
59- The data to scan and summarize.
59+ The data to scan and summarize. This could be a DataFrame object, an Ibis table object,
60+ a CSV file path, a Parquet file path, or a database connection string.
6061 tbl_name
6162 Optionally, the name of the table could be provided as `tbl_name`.
6263
@@ -122,6 +123,23 @@ class DataScan:
122123
123124 # TODO: This needs to be generically typed at the class level, ie. DataScan[T]
124125 def __init__ (self , data : IntoFrameT , tbl_name : str | None = None ) -> None :
126+ # Import processing functions from validate module
127+ from pointblank .validate import (
128+ _process_connection_string ,
129+ _process_csv_input ,
130+ _process_parquet_input ,
131+ )
132+
133+ # Process input data to handle different data source types
134+ # Handle connection string input (e.g., "duckdb:///path/to/file.ddb::table_name")
135+ data = _process_connection_string (data )
136+
137+ # Handle CSV file input (e.g., "data.csv" or Path("data.csv"))
138+ data = _process_csv_input (data )
139+
140+ # Handle Parquet file input (e.g., "data.parquet", "data/*.parquet", "data/")
141+ data = _process_parquet_input (data )
142+
125143 as_native = nw .from_native (data )
126144
127145 if as_native .implementation .name == "IBIS" and as_native ._level == "lazy" :
@@ -514,8 +532,9 @@ def col_summary_tbl(data: FrameT | Any, tbl_name: str | None = None) -> GT:
514532 Parameters
515533 ----------
516534 data
517- The table to summarize, which could be a DataFrame object or an Ibis table object. Read the
518- *Supported Input Table Types* section for details on the supported table types.
535+ The table to summarize, which could be a DataFrame object, an Ibis table object, a CSV
536+ file path, a Parquet file path, or a database connection string. Read the *Supported Input
537+ Table Types* section for details on the supported table types.
519538 tbl_name
520539 Optionally, the name of the table could be provided as `tbl_name=`.
521540
@@ -535,6 +554,10 @@ def col_summary_tbl(data: FrameT | Any, tbl_name: str | None = None) -> GT:
535554 - PostgreSQL table (`"postgresql"`)*
536555 - SQLite table (`"sqlite"`)*
537556 - Parquet table (`"parquet"`)*
557+ - CSV files (string path or `pathlib.Path` object with `.csv` extension)
558+ - Parquet files (string path, `pathlib.Path` object, glob pattern, directory with `.parquet`
559+ extension, or partitioned dataset)
560+ - Database connection strings (URI format with optional table specification)
538561
539562 The table types marked with an asterisk need to be prepared as Ibis tables (with type of
540563 `ibis.expr.types.relations.Table`). Furthermore, using `col_summary_tbl()` with these types of
@@ -566,5 +589,22 @@ def col_summary_tbl(data: FrameT | Any, tbl_name: str | None = None) -> GT:
566589 ```
567590 """
568591
592+ # Import processing functions from validate module
593+ from pointblank .validate import (
594+ _process_connection_string ,
595+ _process_csv_input ,
596+ _process_parquet_input ,
597+ )
598+
599+ # Process input data to handle different data source types
600+ # Handle connection string input (e.g., "duckdb:///path/to/file.ddb::table_name")
601+ data = _process_connection_string (data )
602+
603+ # Handle CSV file input (e.g., "data.csv" or Path("data.csv"))
604+ data = _process_csv_input (data )
605+
606+ # Handle Parquet file input (e.g., "data.parquet", "data/*.parquet", "data/")
607+ data = _process_parquet_input (data )
608+
569609 scanner = DataScan (data = data , tbl_name = tbl_name )
570610 return scanner .get_tabular_report ()
0 commit comments