agate 1.12.0¶
agate is a Python data analysis library that is optimized for humans instead of machines. It is an alternative to numpy and pandas that solves real-world problems with readable code.
agate was previously known as journalism.
Important links:
Documentation: https://agate.rtfd.org
Repository: https://github.com/wireservice/agate
Show me docs¶
About - why you should use agate and the principles that guide its development
Install - how to install for users and developers
Tutorial - a step-by-step guide to start using agate
Cookbook - sample code showing how to accomplish dozens of common tasks, including comparisons to SQL, R, etc.
Extensions - a list of libraries that extend agate functionality and how to build your own
API - technical documentation for every agate feature
Changelog - a record of every change made to agate for each release
Show me code¶
import agate
purchases = agate.Table.from_csv('examples/realdata/ks_1033_data.csv')
by_county = purchases.group_by('county')
totals = by_county.aggregate([
('county_cost', agate.Sum('total_cost'))
])
totals = totals.order_by('county_cost', reverse=True)
totals.limit(10).print_bars('county', 'county_cost', width=80)
county county_cost
SEDGWICK 977,174.45 ▓░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
COFFEY 691,749.03 ▓░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
MONTGOMERY 447,581.20 ▓░░░░░░░░░░░░░░░░░░░░░░░░░
JOHNSON 420,628.00 ▓░░░░░░░░░░░░░░░░░░░░░░░░
SALINE 245,450.24 ▓░░░░░░░░░░░░░░
FINNEY 171,862.20 ▓░░░░░░░░░░
BROWN 145,254.96 ▓░░░░░░░░
KIOWA 97,974.00 ▓░░░░░
WILSON 74,747.10 ▓░░░░
FORD 70,780.00 ▓░░░░
+-------------+-------------+-------------+-------------+
0 250,000 500,000 750,000 1,000,000
This example, along with detailed comments, are available as a Jupyter notebook.
Join us¶
Contributing - guidance for developers who want to contribute to agate
Release process - the process for maintainers to publish new releases
License - a copy of the MIT open source license covering agate
Who we are¶
agate is made by a community. The following individuals have contributed code, documentation, or expertise to agate: