Saravanan666/pypi-org huggingface dataset:
Package: pandarus
# Pandarus[![Build Status](https://travis-ci.org/cmutel/pandarus.svg?branch=master)](https://travis-ci.org/cmutel/pandarus) [![codecov](https://codecov.io/gh/cmutel/pandarus/branch/master/graph/badge.svg)](https://codecov.io/gh/cmutel/pandarus) [![Docs](https://readthedocs.org/projects/pandarus/badge/?version=latest)](http://pandarus.readthedocs.io/?badge=latest) [![status](http://joss.theoj.org/papers/99cd637f2eac0ffaba0be09fd3f0d75c/status.svg)](http://joss.theoj.org/papers/99cd637f2eac0ffaba0be09fd3f0d75c)Pandarus is a GIS software toolkit for regionalized life cycle assessment. It is designed to work with [brightway LCA framework](https://brightwaylca.org), [brightway2-regional](https://bitbucket.org/cmutel/brightway2-regional), and [Constructive Geometries](https://bitbucket.org/cmutel/constructive-geometries).For more information, including installation instructions, see the [online documentation](https://pandarus.readthedocs.io/), including a [usage example](https://github.com/cmutel/pandarus/blob/master/docs/usage_example.ipynb). Pandarus is only compatible with >= Python 3.5.Pandarus provides the following functionality:[Overlay two vector datasets](https://pandarus.readthedocs.io/#intersecting-two-vector-datasets), calculating the areas of each combination of features using the Mollweide projection.Calculate the [area of the geometric difference](https://pandarus.readthedocs.io/#calculating-area-outside-of-intersections) (the areas present in one input file but not in the other) of one vector dataset with another vector dataset.[Calculate statistics](https://pandarus.readthedocs.io/#calculating-raster-statistics-against-a-vector-dataset) such as min, mean, and max when overlaying a raster dataset with a vector dataset.[Normalize raster datasets](https://pandarus.readthedocs.io/#manipulating-raster-files), including use of compatiblenodatavaluesVectorization of raster datasets## Requirements[appdirs](https://pypi.python.org/pypi/appdirs)[fiona](https://pypi.python.org/pypi/Fiona)[numpy](http://www.numpy.org/)[pyproj](https://pypi.python.org/pypi/pyproj)[rasterio](https://github.com/mapbox/rasterio)[rasterstats](https://pypi.python.org/pypi/rasterstats)[Rtree](https://pypi.python.org/pypi/Rtree/)[shapely](https://pypi.python.org/pypi/Shapely)## DevelopmentPandarus is developed by [Chris Mutel](https://chris.mutel.org/) as part of his work at the [Technology Assessment Group](https://www.psi.ch/ta/technology-assessment) at the Paul Scherrer Institut and previously at the [Ecological Systems Design group](http://www.ifu.ethz.ch/ESD/index_EN) at ETH Zürich.Source code is available on [GitHub](https://github.com/cmutel/pandarus).
Package: pandas2pgfplots
pandas2pgfplotsPandas2pgfplots supports plotting of data stored inpandasDataFrame objects
usingpgfplotsthat is based on the amazingTikZ and PGFpackages. The code
generated by this package can be easily included in LaTeX documents. In Jupyter
notebooks, the plots are rendered usingitikz(requires working LaTeX
distribution in$PATH).Currently, the package only supports two kinds of plots:scatter plotscactus plotsInstallationRequirementspandas>=1.0itikz>=0.1.5working LaTeX distributionThe Python requirements and pandas2pgfplots itself can be installed fromPyPIusing pip bypython3-mpipinstall-Upandas2pgfplotsUsage intructionsTBA
Package: pandas2tensorboard
Pandas2TensorBoardPandas2TensorBoardis a library for transforming thepandas DataFrameinto the data fomrat ofTensorBoard.Pandas2TensorBoardrelies ontorch utilitiesfor the data transformation.InstallationRegular installation viapip:pipinstallpandas2tensorboardWithmodinbackend forpandaspipinstallpandas2tensorboard[modin]WithDaskandomniscisupport forpandaspipinstallpandas2tensorboard[backend]WithDaskandomniscisupport forpandasandmodinbackend forpandaspipinstallpandas2tensorboard[all]UsageCurrently the following types of export frompandastotensorboardare
supported:pd.DataFrame->scalarspd.DataFrame->scalarswith timestamppd.DataFrame->scattervia hyperparametersFor initializing thepandas2tensorboardlibrary, the current syntax of Torch'stensorboard.SummaryWriteris used.ExamplesExporting a regularpd.DataFrametotensorboardby removing columns withstr:importseabornassnsfrompandas2tensorboardimportpandas2tensorboardasp2tpt=p2t.Pandas2TensorBoard()pt.regular_df(sns.load_dataset("planets"),label="planets",remove_nan=True,remove_str=True,)pt.close()Exporting apd.DataFramewith time column totensorboard:importseabornassnsfrompandas2tensorboardimportpandas2tensorboardasp2tpt=p2t.Pandas2TensorBoard()pt.timeseries_df(sns.load_dataset("attention"),time="score",label="attention",remove_nan=True,remove_str=True,time_convert=True,)pt.close()The time column with namescoreis transformed intofloatwith timestamp.Exporting apd.DataFramewith hyperparameters totensorboard:importseabornassnsfrompandas2tensorboardimportpandas2tensorboardasp2tpt=p2t.Pandas2TensorBoard()pt.scatter_df(sns.load_dataset("anagrams"),x_axis="subidr",group="anagrams",remove_nan=True,remove_str=True,)pt.close()Thex-axiscorresponds tohparam_dict; the dataframe without columnx_axis="subidr"corresponds tometric_dict.ContributingPlease feel free to open anissueor create apull request; see alsocontributing.LicenseCheckMIT
Package: pandas3js
Project:https://github.com/chrisjsewell/pandas3jsAn extension fortraitletsandpythreejsthat:Provides a 2-waypandasdataframe interface for trait objects.Provides simple, high level (renderer agnostic) geometries, with default json specified mappings to pythreejs primitives.Creates bespoke 3D Graphics GUIs in the Jupyter Notebook with only a few lines of code.From:pandas3js_example.ipynbFor more information, all functions contain docstrings with tested examples.Installation$ pip install pandas3js
$ jupyter nbextension enable --py --sys-prefix pythreejspandas3jsis integration tested against python versions 2.7, 3.4, 3.5 and 3.6Technical DetailsEmploying a meta Model/View design; Unique geometry objects are stored in aGeometryCollectionmodelobject,
which can be viewed as (and modified by) apandas.DataFrame, containing objects (by row) and traits/object_type (by column).
TheGeometryCollection(and its objects) can then be directionally synced to apythreejs.Scene(andpythreejs.3DObjects)view,viaa json mapping specification.
Package: pandas_access
# What is this?A tiny, `subprocess`-based tool for reading a[MS Access](https://products.office.com/en-us/access)database (`.rdb`) as a [Pandas](http://pandas.pydata.org/)[DataFrame](http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.html).## InstallationTo read the database, this package (thinly!) wraps[MDBTools](http://mdbtools.sourceforge.net/). Since I assume you're alreadyusing Pandas, it should be your only installation requirement.If you are on `OSX`, install it via [Homebrew](http://brew.sh/):```sh$ brew install mdbtools```Then, do,```sh$ pip install pandas_access```## Usage```pythonimport pandas_access as mdb# Listing the tables.for tbl in mdb.list_tables("my.mdb"):print(tbl)# Read a small table.df = pandas_access.read_table("my.mdb", "MyTable")# Read a huge table.accumulator = []for chunk in pandas_access.read_table("my.mdb", "MyTable", chunksize=10000):accumulator.append(f(chunk))```If you need more power than this, see:[pyodbc](https://github.com/mkleehammer/pyodbc).## TestingI needed this code in a quick pinch -- I had no access to MS Access, and I hada single `.mdb` file. If someone with Access would like to create a tinydatabase for unit-testing purposes, I'd be much obliged.
Package: pandas-accumulate
pandas-accumulate: accumulate values along Pandas seriesThis package provides one function that allows accumulating values along a
Pandas series very similar tocumsumandcumprodbut allowing also other
operators like|.Usage examplescumsumReplicate cumsum:>>>importoperator>>>importpandasaspd>>>frompandas_accumulateimportaccumulate>>>s=pd.Series([1,2,3])>>>accumulate(s,operator.add)011326dtype:int64cumulativeunique()Collect the unique values cumulatively.Note: You need to pass aninitialvalue for the accumulation in this example:>>>s=pd.Series([1,2,1,3,2])>>>deff(acc,v):...returnacc|{v}>>>accumulate(s,f,initial=set())0{1}1{1,2}2{1,2}3{1,2,3}4{1,2,3}dtype:objectcumulativenunique()If you're interested only in the number of unique values, just calllenat
the end:>>>accumulate(s,f,initial=set()).map(len)0112223343dtype:int64
Package: pandas-aiohttp
pandas aiohttp pluginAdds the functionsSeries.aiohttp.get_text()andSeries.aiohttp.get_json()to pandas Series objects.1. Usage Notes2. Examples2.1.Series.aiohttp.get_text()2.2.Series.aiohttp.get_json()2.3. Manual Async Runtime1. Usage NotesBothget_text()andget_json()support the parameterslimit:int=100andssl:bool=Truewhich limit concurrent connections and enable or disable SSL
verification, respectively. More features may be supported in the future.2. ExamplesThe following examples assume that you are running in a Jupyter notebook.If you are running in a regular python environment, you will need to use theasyncio.run()function to run the code. See the last example.2.1.Series.aiohttp.get_text()importpandasaspdimportpandas_aiohttp# The next line is only needed if you want to prevent your IDE from highlighting as "unused import"assertpandas_aiohttppost_urls=pd.Series(["https://jsonplaceholder.typicode.com/posts/1","https://jsonplaceholder.typicode.com/posts/2",])data=awaitpost_urls.aiohttp.get_text()0    {\n  "userId": 1,\n  "id": 1,\n  "title": "sun...
1    {\n  "userId": 1,\n  "id": 2,\n  "title": "qui...
dtype: object2.2.Series.aiohttp.get_json()A more common usage pattern;importpandasaspdimportpandas_aiohttp# create an example data frame:frame=pd.DataFrame(columns=["A","B"],data=[["XY",23],["YZ",34],["ZX",45]])# Build a series of urls from the dataframe columns,# and assign to a new column named "data":frame["data"]=await("https://httpbin.org/get"+"?A="+frame["A"]+"&B="+frame["B"].astype(str)).aiohttp.get_json()result0    {'args': {'A': 'XY', 'B': '23'}, 'headers': {'...
1    {'args': {'A': 'YZ', 'B': '34'}, 'headers': {'...
2    {'args': {'A': 'ZX', 'B': '45'}, 'headers': {'...
dtype: object2.3. Manual Async RuntimeIf you are running in a regular python environment, you will need to use theasyncio.run()function to run the code.importpandasaspdimportpandas_aiohttpimportasynciopost_urls=pd.Series(["https://jsonplaceholder.typicode.com/posts/1","https://jsonplaceholder.typicode.com/posts/2",])asyncdefmain():data=awaitpost_urls.aiohttp.get_text()print(data)asyncio.run(main())
Package: pandas-amazon-redshift
pandas-amazon-redshiftis a package to provide an interface between
the Amazon Redshift Data API and pandas.This package allows you to pass data between Amazon Redshift and``pandas.DataFrame``
objects without managing database connections.In addtion, you can receive the following benefit from this package.When reading data from Redshift, this package cast data to appropriate data typeBefore writing data to Redshift, this package check the data. In case invalid data for specified
data type, this package raises error before manipulating Redshift cluster like creating tables
or inserting data, which means atomicity.You can use this package for both private and commercial use while this project is
not officially supported by Amazon Web Services.Now I am looking for contributors to enhance this package. If you are interested, feel free to pull
requests or reach out to me.Install latest release version via pip$pipinstallpandas-amazon-redshiftInstall latest development version$pipinstallgit+https://github.com/yutaka-kabu/pandas-amazon-redshift.git
Package: pandas-appender
pandas-appenderHave you ever wanted to append a bunch of rows to a Pandas DataFrame?
Turns out that it's extremely inefficient to do! For a large
dataframe, you're supposed to make multiple dataframes andpd.concat()them instead.Also, Pandas deprecateddataframe.append()in version 1.4 and
intends to remove it in 2.0.So... helper function? Pandas doesn't have one. Roll your own?
Ugh. OK then: here's that helper function. It can append around 1
million very small rows per cpu-second. It has a modest additional
memory usage of around 5 megabytes, dynamically growing with the
number of rows appended.Installpip install pandas-appenderUsagefrom pandas_appender import DF_Appender

dfa = DF_Appender(ignore_index=True)  # note that ignore_index moves to the init
for i in range(1_000_000):
    dfa = dfa.append({'i': i})

df = dfa.finalize()  # must call .finalize() before you can use the resultsType hints and category detectionUsing narrower types and categories can often dramatically reduce the size of a
DataFrame. There are two ways to do this in pandas-appender. One is to
append to an existing dataframe:dfa = DF_Appender(df, ignore_index=True)and the second is to pass in adtypes=argument:dfa = DF_Appender(ignore_index=True, dtypes=another_dataframe.dtypes)pandas-appender also offers a way to infer which columns would be smaller
if they were categories. This code will either analyze an existing dataframe
that you're appending to:dfa = DF_Appender(df, ignore_index=True, infer_categories=True)or it will analyze the first chunk of appended lines:dfa = DF_Appender(ignore_index=True, infer_categories=True)These inferred categories will override existing types or adtypes=argument.Incompatibilities with pandas.DataFrame.append()DF_Appender must be finalized before usePandas:df_new = df.append()  # df_new is a dataframeDF_Appender:dfa_new = dfa.append()  # must do df = dfa.finalize() to get a DataFramepandas.DataFame.append is idempotent, DF_Appender is notPandas:df_new = df.append()  # df is not changedDF_Appender:dfa_new = dfa.append()  # modifies dfa, and dfa_new == dfapandas.DataFrame.append will promote types, while DF_Appender is strictPandas: append0.1to an integer column, and the column will be promoted to floatDF_Appender: when initialized withdtypes=or an existing DataFrame, appending0.1to an integer column causes0.1to be cast to an integer, i.e.0.
Package: pandasaurus
PandasaurusSTATUS: BETAA python library supporting simple queries over ontology annotations in dataframes, using UberGraph queries.The aim for now is to keep this as a very simple independent Python lib avoiding any complex dependencies.With the basic library in place, the first planned use for this is as a base for a library that provides simple enrichement and querability to AnnData Cell X Gene matrices following theCZ single cell curation standard.
Package: pandasaurus-cxg
pandasaurus_cxgSTATUS: early BetaA library for retrieving and leveraging the semantic context of ontology annotation inCxG standardAnnData files.Slide summarising intended functionalityInstallationAvailable onPyPi$ pip3 install pandasaurus_cxgDetailed installation guide for pygraphviz issueDuring package installation, sometimes the pygraphviz package installation is failing onmacOSdue to Graphviz may be
installed in a location that is not on the default search path. In this case, it may be necessary to manually
specify the path to the graphviz include and/or library directories. To do that use following instructions and install
pygraphviz manually.brew install graphviz
export CFLAGS="-I $(brew --prefix graphviz)/include"
export LDFLAGS="-L $(brew --prefix graphviz)/lib"
pip install pygraphvizUsageTheAnndataEnricherandAnndataAnalyzerclasses can be used both individually and in conjunction with theAnndataEnrichmentAnalyzerwrapper class. TheAnndataEnrichmentAnalyzerclass serves as a convenient way to leverage the functionalities of bothAnndataEnricherandAnndataAnalyzer.Using AnndataEnricher and AnndataAnalyzer IndividuallyYou can use theAnndataEnricherandAnndataAnalyzerclasses separately to perform specific tasks on your data. For instance,AnndataEnricherfacilitates data enrichment, whileAnndataAnalyzerprovides various analysis tools for Anndata objects.frompandasaurus_cxg.anndata_enricherimportAnndataEnricherade=AnndataEnricher.from_file_path("test/data/modified_human_kidney.h5ad")ade.simple_enrichment()ade.minimal_slim_enrichment(["blood_and_immune_upper_slim"])frompandasaurus_cxg.anndata_analyzerimportAnndataAnalyzerada=AnndataAnalyzer.from_file_path("./immune_example.h5ad",author_cell_type_list=['subclass.full','subclass.l3','subclass.l2','subclass.l1','class','author_cell_type'])ada.co_annotation_report()Using AnndataEnrichmentAnalyzer WrapperThe AnndataEnrichmentAnalyzer class wraps the functionality of both AnndataEnricher and AnndataAnalyzer, offering a seamless way to perform enrichment and analysis in one go.frompandasaurus_cxg.enrichment_analysisimportAnndataEnrichmentAnalyzerfrompandasaurus_cxg.graph_generator.graph_generatorimportGraphGeneratoraea=AnndataEnrichmentAnalyzer("test/data/modified_human_kidney.h5ad")aea.contextual_slim_enrichment()aea.co_annotation_report()gg=GraphGenerator(aea)gg.generate_rdf_graph()gg.set_label_adding_priority(["class","cell_type","subclass.l1","subclass.l1","subclass.full","subclass.l2","subclass.l3"])gg.add_label_to_terms()gg.enrich_rdf_graph()gg.save_rdf_graph(file_name="kidney_new",_format="ttl")More examples and detailed explanation can be found in jupyter notebook given inSnippetsSnippetshttps://github.com/INCATools/pandasaurus_cxg/blob/main/walkthrough.ipynbLibrary Documentationhttps://incatools.github.io/pandasaurus_cxg/Roadmaphttps://github.com/INCATools/pandasaurus_cxg/blob/main/ROADMAP.md
Package: pandas-aws
Pandas AWS - AWS made easy for data scientistsPandas AWS makes it super easy to use a pandas.DataFrame along with AWS services.Working with S3First create an S3 client to be used later and define a bucketfrom pandas_aws import get_client

s3 = get_client('s3')
MY_BUCKET= 'pandas-aws-bucket'Example 1: get a DataFrame from a parquet file stored in S3from pandas_aws.s3 import get_df

df_from_parquet_file = get_df(s3, MY_BUCKET, 'my_parquet_file_path', format='parquet')Example 2: get a DataFrame from multiple CSV files (with same schema) stored in S3from pandas_aws.s3 import get_df_from_keys

df_from_list = get_df_from_keys(s3, MY_BUCKET, prefix='my-folder', suffix='.csv')Example 3: put a DataFrame into S3 using an xlsx (Excel) file formatfrom pandas_aws.s3 import put_df

put_df(s3, my_dataframe, MY_BUCKET, 'target_file_path', format='xlsx')Example 4: put a DataFrame into S3 using multi parts uploadfrom pandas_aws.s3 import put_df

put_df(s3, my_dataframe, MY_BUCKET, 'target_file_path', format='csv', compression='gzip', parts=8)Installing pandas-awsPip installationYou can use pip to download the packagepip install pandas-awsContributing to pandas-awsGit cloneWe use thedevelopbrand as the release branch, thusgit clonethe repository andgit checkout developin order to get the latest version in development.git clone git@github.com:FlorentPajot/pandas-aws.gitPreparing your environmentPandas AWS usespoetryto manage dependencies. Thus,poetryis required:curl -SSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | pythonCreate a separate Python environment, for example usingpyenvalong withpyenv-virtualenvand Python 3.7.7:pyenv install 3.7.7
pyenv virtualenv 3.7.7 pandas-aws
pyenv activate pandas-awsCheck your environment using:which python
// should show something like .pyenv/shims/python
python -V
// should show python 3.7.7 (or any other version you selected)
pip list
// should show barely nothing except pip and setuptoolsIn cas your encounter a problem, checkPyenvdocumentation.Then install dependencies with poetry after yourgit clonefrom the project repository:poetry installGuidelinesTodoRequiresThe project needs the following dependencies:libpq-dev (psycopg2 dependency)
Package: pandas-bokeh
Pandas BokehPandas Bokehprovides aBokehplotting backend forPandasandGeoPandas, similar to the already existingVisualizationfeature of Pandas. Importing the library adds a complementary plotting methodplot_bokeh()onDataFramesandSeries. It also has native plotting backend support for Pandas >= 0.25.For more information and examples have a look at theGithub Repository.InstallationYou can installPandas BokehfromPyPIviapip:pip install pandas-bokehorconda:conda install -c patrikhlobil pandas-bokehPandas Bokehis officially supported on Python 3.5 and above.DescriptionWithPandas Bokeh, creating stunning, interactive, HTML-based visualization is as easy as calling:df.plot_bokeh()In release0.5.5, the following plot types are supported:linesteppointscatterbarhistogramareapiemapplotFurthermore, alsoGeoPandasandPysparkhave a new plotting backend as can be seen in the providedexamples.Pandas Bokehis a high-level API forBokehon top ofPandasandGeoPandasthat tries to figure out best, what the user wants to plot. Nevertheless, there are many options for customizing the plots, for example:figsize: Choose width & height of the plottitle: Sets title of the plotxlim/ylim: Set visible range of plot for x- and y-axis (also works fordatetime x-axis)xlabel/ylabel: Set x- and y-labelslogx/logy: Set log-scale on x-/y-axisxticks/yticks: Explicitly set the ticks on the axescolormap: Defines the colors to plot. Can be either a list of colors or the name of aBokeh color palettehovertool_string: For customization of hovertool contentEach plot type like scatterplot or histogram further has many more additional customization options that is describedhere.
Package: pandas-bootstrap
Pandas BootstrapStatistical Bootstrap with Pandas made easy.Installationpipinstallpandas-bootstrapUsageThe module is very easy to use.import bootstrapdefine statistic function:def some_func(df: pd.DataFrame | pd.Series):get bootstrapped samples:df.boot.get_samples(bfunc=some_func, B=100)Below is a simple example of bootstrapping the mean of two columns.importpandasaspdimportbootstrapdf=pd.DataFrame({'a':[1,2,3,4,5],'b':[6,7,8,9,10],})defmean_of_columns(df):returndf.mean(numeric_only=True)sample_kwargs=dict(random_state=42)df_bootstrap=df.boot.get_samples(bfunc=mean_of_columns,B=5,sample_kwargs=sample_kwargs)which results in:a    b
sample          
0       3.0  8.0
1       2.6  7.6
2       4.0  9.0
3       3.2  8.2
4       3.0  8.0DocumentationRead more in thedocumentation
Package: pandasbots-gimbel
Pandas Bots- PythonAutomation that saves time and money.Contact us now!Implementations are for learning purposes only. As they may be less efficient than the implementations in the Python standard library, use them at your discretion.DISCLAIMERThis package requires selenium. For that reason it will may not work if you are using Google Colab or similar.Project Gimbel MexicanaGitHub:https://github.com/PandasBots/pandasbots-gimbelRef.:https://gimbelmexicana.com/Author: Rafael Klanfer NunesDescription:User will input the website URL and the program will return:Excel file containing product info.PDF file containg product instructions.JSON file with:name:  The name of the productcode: The SKU of the product (codigo)Image: The src url of the images of the productDetails: The details of the product (separating each in JSON format)Info: The "more info" of the product (separating each in JSON format)Brand: The brand nameInstallingpip install gimbelUsage>>> from gimbel import gimbel_scraper
>>> URL = "https://gimbelmexicana.com/gimbel/store/articulo/16680"
>>> data = gimbel_scraper.get_product_info(URL)
>>> print(data)Return{'Brand': 'GIM SPORTS', 'Code': 'Código: 15GIMNAS419CH', 'Name': 'BALON PARA CROSSFIT 2KG', 'Details': 'ÿþBalón medicinal para CROSSFIT\n\nCaracterísticas:\n" Fabricada de caucho resistente con relleno de arena.\n* Superficie con textura que evita derrape\n" No rebota\n" Perfecta para complementar los ejercicios de fuerza y resistencia en los músculos.\n" Entre los principales músculos trabajados encontramos glúteos/ cuádriceps/ isquiotibiales/ hombros y de forma secundaria/ abdominales\ny demás músculos de zona media del cuerpo que se contraen para conservar una correcta postura durante el movimiento.\n" Marca \x1c GIM\x1d', 'Info': '{"C\\u00f3digo":{"0":null,"1":"15GIMNAS419CH"},"Peso":{"0":null,"1":"2 kg"},"Color":{"0":null,"1":"Azul"}}', 'Image': ['https://gimbelmexicana.com/gimbel/img/products_images/thumb/15GIMNAS419CH_1.jpg', 'https://gimbelmexicana.com/gimbel/img/products_images/thumb/15GIMNAS419CH.jpg']}