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
pandascodes 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.pyis the interpreter which executes our checker's semantic.spec.pycontains the definition of our checker's check functions.lsp.pyis 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