{"repo":"machow/siuba","free":true,"listed":false,"github":"https://github.com/machow/siuba","clone":"git clone https://github.com/machow/siuba.git","description":"Python library for using dplyr like syntax with pandas and SQL","language":"Python","stars":1183,"topics":["data-analysis","python","pandas","sql","dplyr"],"license":"MIT","category":"databases-storage","readme_excerpt":"siuba ===== scrappy data analysis, with seamless support for pandas and SQL siuba (小巴) is a port of dplyr and other R libraries. It supports a tabular data analysis workflow centered on 5 common actions: select() - keep certain columns of data. filter() - keep certain rows of data. mutate() - create or modify an existing column of data. summarize() - reduce one or more columns down to a single number. arrange() - reorder the rows of data. These actions can be preceded by a group by() , which causes them to be applied individually to grouped rows of data. Moreover, many SQL concepts, such as distinct() , count() , and joins are implemented. Inputs to these functions can be a pandas DataFrame or SQL connection (currently postgres, redshift, or sqlite). For more on the rationale behind tools like dplyr, see this tidyverse paper. For examples of siuba in action, see the siuba guide. Installation ------------ Examples -------- See the siuba guide or this live analysis for a full introduction. Basic use The code below uses the example DataFrame mtcars , to get the average horsepower (hp) per cylinder. There are three key concepts in this example: concept example meaning ------- ------- ------- verb group by(...) a function that operates on a table, like a DataFrame or SQL table siu expression .hp.mean() an expression created with siuba. , that represents actions you want to perform pipe mtcars group by(...) a syntax that allows you to chain verbs with the operator See the siuba gui","default_branch":null,"files":null,"tree":[],"storefront":"/r/machow","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/machow/siuba/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}