PDChecker is an experimental static analysis tool for pandas based on alternative semantic. PDChecker keeps tracks on column label/type of dataframes and provides type check information to user. Also, PDChecker is in an early development stage currently, please feel free to play around.
Requirements: Python 3.8
-
Download the source by
git clone
/github repo. -
(Optional) preparing a virtual environment:
python3.8 -m venv venv source venv/bin/activate
-
Install dependent packages:
pip install -r requirements.txt
-
Check
pandas
codes by command-line or LSP:$ cd example; python ../checker.py ex.py 4 2 Index 'not_existed' not found.
lsp.py
is a Language Server which fires a server instance up at localhost:8080
。
checker.py
is the interpreter which executes our checker's semantic.spec.py
contains the definition of our checker's check functions.lsp.py
is the LSP Server implementation.
- YungYu Zhuang and Ming-Yang Lu.
Enabling Type Checking on Columns in Data Frame Libraries by Abstract Interpretation.
IEEE Access, Volume 10,
pp.14418-14428, January 2022.
Available at IEEE Xplore