A Guide to Data Analytics with DuckDB


The life of a data analyst revolves around loading data through SQL serve, analyzing it using various Python packages, and finally creating the technical report. Sometimes these SQL queries can take a longer time to process as we are dealing with terabytes of data. In this fast-paced world, this strategy fails miserably and most analytics are moving away from traditional ways to doing data analytics. DuckDB solves all the issues, it is integrated with Python & R. It works similarly to SQLite and focuses on providing faster analytical queries.



Sample Code

res = duckdb.query(SELECT sex, SUM(expected_recovery_amount) as Expected,
 SUM(actual_recovery_amount) as Actual 
 FROM bank_data.csv
 WHERE recovery_strategy LIKE Level 4 Recovery
 GROUP BY sex
 HAVING sex = Female’”)
res.df()

code result
Read full guide on Analytics Vidhya

Source: DEV Community

December 1, 2021
Category : News
Tags: Analytics | beginners | datascience | SQL

Leave a Reply

Your email address will not be published. Required fields are marked *

Sitemap | Terms | Privacy | Cookies | Advertising

Senior Software Developer

Creator of @LzoMedia I am a backend software developer based in London who likes beautiful code and has an adherence to standards & love's open-source.