Package: dataprep
Documentation|ForumDataPrep lets you prepare your data using a single library with a few lines of code.Currently, you can use DataPrep to:Collect data from common data sources (throughdataprep.connector)Do your exploratory data analysis (throughdataprep.eda)Clean and standardize data (throughdataprep.clean)...more modules are comingReleasesRepoVersionDownloadsPyPIconda-forgeInstallationpipinstall-UdataprepEDADataPrep.EDA is the fastest and the easiest EDA (Exploratory Data Analysis) tool in Python. It allows you to understand a Pandas/Dask DataFrame with a few lines of code in seconds.Create Profile Reports, FastYou can create a beautiful profile report from a Pandas/Dask DataFrame with thecreate_reportfunction. DataPrep.EDA has the following advantages compared to other tools:10X Faster: DataPrep.EDA can be 10X faster than Pandas-based profiling tools due to its highly optimized Dask-based computing module.Interactive Visualization: DataPrep.EDA generates interactive visualizations in a report, which makes the report look more appealing to end users.Big Data Support: DataPrep.EDA naturally supports big data stored in a Dask cluster by accepting a Dask dataframe as input.The following code demonstrates how to use DataPrep.EDA to create a profile report for the titanic dataset.fromdataprep.datasetsimportload_datasetfromdataprep.edaimportcreate_reportdf=load_dataset("titanic")create_report(df).show_browser()Clickhereto see the generated report of the above code.Clickhereto see the benchmark result.Try DataPrep.EDA Online:DataPrep.EDA Demo in ColabInnovative System DesignDataPrep.EDA is theonlytask-centric EDA system in Python. It is carefully designed to improve usability.Task-Centric API Design: You can declaratively specify a wide range of EDA tasks in different granularity with a single function call. All needed visualizations will be automatically and intelligently generated for you.Auto-Insights: DataPrep.EDA automatically detects and highlights the insights (e.g., a column has many outliers) to facilitate pattern discovery about the data.How-to Guide: A how-to guide is provided to show the configuration of each plot function. With this feature, you can easily customize the generated visualizations.Learn DataPrep.EDA in 2 minutes:Clickhereto check all the supported tasks.Checkplot,plot_correlation,plot_missingandcreate_reportto see how each function works.CleanDataPrep.Clean contains about140+functions designed for cleaning and validating data in a DataFrame. It providesA Convenient GUI: incorporated into Jupyter Notebook, users can clean their own DataFrame without any coding (see the video below).A Unified API: each function follows the syntaxclean_{type}(df, 'column name')(see an example below).Speed: the computations are parallelized using Dask. It can clean50K rows per secondon a dual-core laptop (that means cleaning 1 million rows in only 20 seconds).Transparency: a report is generated that summarizes the alterations to the data that occured during cleaning.The following video shows how to use GUI of Dataprep.CleanThe following example shows how to clean and standardize a column of country names.fromdataprep.cleanimportclean_countryimportpandasaspddf=pd.DataFrame({'country':['USA','country: Canada','233',' tr ','NA']})df2=clean_country(df,'country')df2countrycountry_clean0USAUnitedStates1country:CanadaCanada2233Estonia3trTurkey4NANaNType validation is also supported:fromdataprep.cleanimportvalidate_countryseries=validate_country(df['country'])series0True1False2True3True4FalseName:country,dtype:boolCheckDocumentation of Dataprep.Cleanto see how each function works.ConnectorConnector now supports loading data from both web API and databases.Web APIConnector is an intuitive, open-source API wrapper that speeds up development by standardizing calls to multiple APIs as a simple workflow.Connector provides a simple wrapper to collect structured data from different Web APIs (e.g., Twitter, Spotify), making web data collection easy and efficient, without requiring advanced programming skills.Do you want to leverage the growing number of websites that are opening their data through public APIs? Connector is for you!Let's check out the several benefits that Connector offers:A unified API:You can fetch data using one or two lines of code to get data fromtens of popular websites.Auto Pagination:Do you want to invoke a Web API that could return a large result set and need to handle it through pagination? Connector automatically does the pagination for you! Just specify the desired number of returned results (argument_count) without getting into unnecessary detail about a specific pagination scheme.Speed:Do you want to fetch results more quickly by making concurrent requests to Web APIs? Through the_concurrencyargument, Connector simplifies concurrency, issuing API requests in parallel while respecting the API's rate limit policy.How to fetch all publications of Andrew Y. Ng?fromdataprep.connectorimportconnectconn_dblp=connect("dblp",_concurrency=5)df=awaitconn_dblp.query("publication",author="Andrew Y. Ng",_count=2000)Here, you can find detailedExamples.Connector is designed to be easy to extend. If you want to connect with your own web API, you just have to write a simpleconfiguration fileto support it. This configuration file describes the API's main attributes like the URL, query parameters, authorization method, pagination properties, etc.DatabaseConnector now has adoptedconnectorxin order to enable loading data from databases (Postgres, Mysql, SQLServer, etc.) into Python dataframes (pandas, dask, modin, arrow, polars) in the fastest and most memory efficient way.[Benchmark]What you need to do is just installconnectorx(pip install -U connectorx) and run one line of code:fromdataprep.connectorimportread_sqlread_sql("postgresql://username:password@server:port/database","SELECT * FROM lineitem")Check outherefor supported databases and dataframes and more examples usages.DocumentationThe following documentation can give you an impression of what DataPrep can do:ConnectorEDACleanContributeThere are many ways to contribute to DataPrep.Submit bugs and help us verify fixes as they are checked in.Review the source code changes.Engage with other DataPrep users and developers on StackOverflow.Ask questions & propose new ideas in ourForum.Contribute bug fixes.Providing use cases and writing down your user experience.Please take a look at ourwikifor development documentations!AcknowledgementSome functionalities of DataPrep are inspired by the following packages.Pandas ProfilingInspired the report functionality and insights provided indataprep.eda.missingnoInspired the missing value analysis indataprep.eda.Citing DataPrepIf you use DataPrep, please consider citing the following paper:Jinglin Peng, Weiyuan Wu, Brandon Lockhart, Song Bian, Jing Nathan Yan, Linghao Xu, Zhixuan Chi, Jeffrey M. Rzeszotarski, and Jiannan Wang.DataPrep.EDA: Task-Centric Exploratory Data Analysis for Statistical
Modeling in Python.SIGMOD 2021.BibTeX entry:@inproceedings{dataprepeda2021,author={Jinglin Peng and Weiyuan Wu and Brandon Lockhart and Song Bian and Jing Nathan Yan and Linghao Xu and Zhixuan Chi and Jeffrey M. Rzeszotarski and Jiannan Wang},title={DataPrep.EDA: Task-Centric Exploratory Data Analysis for Statistical Modeling in Python},booktitle={Proceedings of the 2021 International Conference on Management of Data (SIGMOD '21), June 20--25, 2021, Virtual Event, China},year={2021}}