{ "info": { "author": "Aaron Fraenkel, Darren Liu", "author_email": "afraenkel@ucsd.edu", "bugtrack_url": null, "classifiers": [], "description": "# babypandas\n`pandas` data-analysis library with a restricted API\n\n---\n\nSimplified introductory `pandas` library that allows for basic tabular data-analysis with only the necessary methods and arguments. Allows\nfor a smooth transition into `pandas`.\n\n---\n\nBerkeley `datascience` module equivalents with `babypandas`:\n\n| `datascience` method \t\t | `babypandas` equivalent or close | method description |\n|---------------------------------------------|------------------------------------------------------------|-------------------------------------------|\n| `Table()` \t\t | `bpd.DataFrame()` | empty table formation |\n| `Table().with_columns(*labels_and_values)` | `bpd.DataFrame().assign(**kwargs)` | table from lists |\n| `table.with_columns(*labels_and_values)` | `df.assign(**kwargs)` | adding columns |\n| `table.with_rows(rows)` | `df.append(other_df, ignore_index=True)` | |\n| `Table.read_table(filepath)` | `bpd.read_csv(filepath)` | read in data |\n| `table.num_columns` | `df.shape[1]` | number of columns |\n| `table.num_rows` \t\t | `df.shape[0]` | number of rows |\n| `table.labels` \t\t | `df.columns` | list of columns |\n| `table.relabeled(label, new_label)` \t\t | `df.assign(new_label=df.get(label)).drop(columns=[label])` | rename columns |\n| `table.column(col)` \t\t | `df.get(col)` \t\t | get a specific column (by name) |\n| `table.column(col).item(0)` \t\t | `df.get(col).iloc[0]` | get a specific value in the table |\n| `table.select(col1, col2)` \t | `df.get([col1, col2])` | get columns as a df |\n| `table.drop(col1, col2)` \t\t | `df.drop(columns=[col1, col2])` | drop columns |\n| `table.sort(col)` \t\t | `df.sort_values(by=col)` | sorts values in a dataframe by col |\n| `table.take(row_indices_or_slice)` | `df.take(row_indices_or_slice)` | selects a single row |\n| `table.where(col, are.above(num))` \t\t | `df.loc[df.get(col) > num]` | selects rows based on condition |\n| `table.scatter(xcol, ycol)` | `df.plot(kind='scatter', x=xcol, y=ycol)` | plots a scatter plot |\n| `table.plot(xcol, ycol)` | `df.plot(x=xcol, y=ycol)` | plots a line plot |\n| `table.barh(col)` | `df.plot(kind='barh', x=col)` | plots a horizontal bar plot |\n| `table.hist(col, bins)` | `df.get(col).plot(kind='hist', bins=bins)` | plots a histogram |\n| `table.apply(fn, col)` | `df.get(col).apply(fn)` | apply function to a column |\n| `table.group(col)` \t\t | `df.groupby(col).count()` | give counts of values in a col |\n| `table.group(col, agg_fn)` \t\t | `df.groupby(col).agg_fn.reset_index()` | groups by column, aggregates with fn |\n| `table.group([col1, col2])` \t\t | `df.groupby([col1, col2]).count().reset_index()` | groups by two cols, agg with counts |\n| `table.group([col1, col2], sum)` \t\t | `df.groupby[col1, col2]).sum().reset_index()` | groups by two cols, agg with sum |\n| `table.join(leftcol, df2, rightcol)` \t\t | `df.merge(df2, left_on=leftcol, right_on=rightcol)` | merges two dataframes (diff col names) |\n| `table.join(col, df2, col)` \t\t | `df.merge(df2, on=col)` | merges two dataframes (same col names) |\n| `table.sample(n)` \t\t | `df.sample(n, replace=True)` | sample with replacement |\n| `sample_proportions(size, distr)` \t\t | `np.random.multinomial(size, distr) / size` | gets sample proportions of a distribution |", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/afraenkel/babypandas", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "babypandas", "package_url": "https://pypi.org/project/babypandas/", "platform": "", "project_url": "https://pypi.org/project/babypandas/", "project_urls": { "Homepage": "https://github.com/afraenkel/babypandas" }, "release_url": "https://pypi.org/project/babypandas/0.1.1/", "requires_dist": null, "requires_python": "", "summary": "A restricted Pandas API", "version": "0.1.1" }, "last_serial": 5892599, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "a4e7ab02490b9d6d110c4696cc8d8275", "sha256": "ef1d208c24c961a8a96e86522804d025519b99c76ad4f3f53dfc5835926c2c66" }, "downloads": -1, "filename": "babypandas-0.1.0.tar.gz", "has_sig": false, "md5_digest": "a4e7ab02490b9d6d110c4696cc8d8275", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8987, "upload_time": "2019-09-26T20:17:43", "url": "https://files.pythonhosted.org/packages/a2/ff/e3e7f6e51877a4880fe31924d992827e0a29e181a7f285370097a0d1003d/babypandas-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "2a78fd11e551c3dcb0b1dbace67a488b", "sha256": "6e524af614b546db2cf26445f70c7ca5cdbde05726d444b85c14de9cf5cd9899" }, "downloads": -1, "filename": "babypandas-0.1.1.tar.gz", "has_sig": false, "md5_digest": "2a78fd11e551c3dcb0b1dbace67a488b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10376, "upload_time": "2019-09-26T20:26:51", "url": "https://files.pythonhosted.org/packages/05/81/b2b4876428034409b28b1e372d932a74151593ef84d7cf38063a539ad9e2/babypandas-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2a78fd11e551c3dcb0b1dbace67a488b", "sha256": "6e524af614b546db2cf26445f70c7ca5cdbde05726d444b85c14de9cf5cd9899" }, "downloads": -1, "filename": "babypandas-0.1.1.tar.gz", "has_sig": false, "md5_digest": "2a78fd11e551c3dcb0b1dbace67a488b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10376, "upload_time": "2019-09-26T20:26:51", "url": "https://files.pythonhosted.org/packages/05/81/b2b4876428034409b28b1e372d932a74151593ef84d7cf38063a539ad9e2/babypandas-0.1.1.tar.gz" } ] }