How to pass libraries to data analysis agent

Hey guys I have a use case where I need to create csv agent that deals with multiple csv/excel files that are very large (1million rows) and the issue is pandas is too slow for this so I need to create an agent where I can allow it to use DuckDB or polars. Any idea how to do this or build it? Thanks