Saravanan666/pypi-org huggingface dataset:
Package: pandastable
IntroductionThe pandastable library provides a table widget for Tkinter with
plotting and data manipulation functionality. It uses the pandas
DataFrame class to store table data. Pandas is an open source Python
library providing high-performance data structures and data analysis
tools. Tkinter is the standard GUI toolkit for python. It is intended
for the following uses:for python/tkinter GUI developers who want to include a table in
their application that can store and process large amounts of datafor non-programmers who are not familiar with Python or the pandas
API and want to use the included DataExplore application to
manipulate/view their datait may also be useful for data analysts and programmers who want to
get an initial interactive look at their tabular data without codingThe DataExplore applicationInstalling the package creates a commanddataexplorein your path.
Just run this to open the program. This is a standalone application for
data manipulation and plotting meant for education and basic data
analysis. See the home page for this application athttp://dmnfarrell.github.io/pandastable/Linkshttp://openresearchsoftware.metajnl.com/articles/10.5334/jors.94/http://dmnfarrell.github.io/pandastable/https://youtu.be/Ss0QIFywt74
Package: pandas_talib
** Work in progress **pandas_talibA Python Pandas implementation of technical indicatorsOriginal version from:Bruno FrancapanpanpandasPeter
BakkerSee also:panpanpandas/ultrafinancellazzaro/analyzerhttps://www.quantopian.com/posts/technical-analysis-indicators-without-talib-codeInstallA package is available and can be downloaded from PyPi and installed
using:$ pip install pandas_talibDevelopmentYou can help to develop this library.IssuesYou can submit issues usinghttps://github.com/femtotrader/pandas_talib/issuesCloneYou can clone repository to try to fix issues yourself using:$ git clone https://github.com/femtotrader/pandas_talib.gitRun unit testsRun all unit tests$ nosetests -s -vRun a given test$ nosetests tests.test_pandas_talib:test_function -s -vInstall development version$ python setup.py installor$ sudo pip install git+git://github.com/femtotrader/pandas_talib.gitCollaboratingFork repositoryCreate a branch which fix a given issueSubmit pull requestshttps://help.github.com/categories/collaborating/
Package: pandas-timeseries
Time SeriesA time series built uponpandasfor dealing with window/point data sources, which has interpolation mindful of gap’s.DesignEach window is represented byvalid_from,valid_to,value.During interpolation, the window time range is transformed into a center pointdatetime.A constraint on the data model is a predefined length of a window, this length is used to query all suitable data and compute gaps.Gaps are determined and a mask is applied to the original data frame.When performing a query on a data frame, missing data at the tail and head are filled in.Sample dataBelow are a visual representation of data within the tests.CompatibilityThis project is compatible with Python 3.5+, Pandas 0.19.Development stateThis library is in alpha state and is subject to revision.
Package: pandastools
pandastools: Helper functions for Pandas DataFrames / SeriesWhat is it?PandasToolsis a Python package that provides additional functions for Pandas DataFrames, Series and Indexes via accessorsMain FeaturesTODOWhere to get itThe source code is currently hosted on GitHub at:https://github.com/phil65/PandasToolsThe latest released version are available at thePython
package index.# or PyPIpipinstallpandastoolsDependenciespandasInstallation from sourcesThis project uses poetry for dependency management and packaging. Install this first.
In thepandastoolsdirectory (same one where you found this file after
cloning the git repo), execute:poetryinstallLicenseMITDocumentationThe official documentation is hosted on Github Pages:https://phil65.github.io/PandasTools/Contributing to pandasAll contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome.Or maybe through using PandasTools you have an idea of your own or are looking for something in the documentation and thinking ‘this can be improved’...you can do something about it!
Package: pandas-to-snowflake
pandas_to_snowflakeThis is a python Package meant to making it easier for uploading dataframe to snowflake tables.InstallationTo install the latest Pypi version, you’ll need to execute:pipinstallpandas_to_snowflakeorpython3-mpipinstallpandas_to_snowflakeIf instead you want to install the latest github master version:gitclonehttps://github.com/nit567esh/pandas_to_snowflake.gitcd<pkg_directory>python3setup.pyinstallDriversThis library usessnowflake.connectorfor connecting to Snowflake.UsageYou’ll have available 3 functions fro different kind of operations:1. sf_create- You can create a table from scratch from python and upload the contents of the data frame.2. sf_append- You can insert/append the contents of the pandas data frame into existing snowflake table.3. sf_upsert- You can insert and update the existing snowflake table using contents of the pandas data frame.# Step 1: Import packageimportpandas_to_snowflakeasps# Step 2: Configure snowflake authenticationsnowflake_auth=(user,password,account,warehouse,database,port)# Step 3: Use sf_create, sf_append or sf_upsertsf_create(snowflake_auth,sql_ddl)Example-ps.sf_create(snowflake_auth=snowflake_auth,sql_ddl="create table test (custkey number default null, orderdate date default null)")sf_append(dataframe,snowflake_auth,schema,table)Example-ps.sf_append(dataframe=iris,snowflake_auth=snowflake_auth,schema='analytics',table='iris'")sf_upsert(dataframe,snowflake_auth,schema,table,upsertkey=('cols',....))Example-ps.sf_upsert(dataframe=order,snowflake_auth=snowflake_auth,schema='analytics',table='order',upsertkey=('date','product',))
Package: pandas-to-sql
pandas-to-sqlintroConvertpandas DataFramemanipulations to sql query string.Here is anExample NotebookInstallationpip install pandas-to=sqlDevelopmentrun examplepython example_runner.pytestspytest ./pandas_to_sqlenvironmentconda env create -f environment.yml --prefix ./envconda activate ./envconda env update --prefix ./env -f environment.ymlconda remove --prefix ./env --allnew releasepython setup.py sdist bdist_wheelpython -m twine upload --repository pypi --skip-existing dist/*
Package: pandas-transform-checker
Pandas transform checkerwhat is it ?This library is focused on data quality checking on pandas transformations.
Transformations are functions that takes a pandas DataFrame as input ( plus
other params ) and output a DataFrame.This library allow the user to specify a contract that the function must respect.
In this contract the user can specify:the added columnsthe deleted columnsthe modified columnsif the function add/drop recordsif the function modify the index ( ex: resampling )Once the contract if specified, the function will raise a RuntimeError
if one of it's specifications is violated.how to use it ?The package contains the decorator that performs the check it can be
imported the following way:from pandas_transform_checker.decorator_contract_checker import input_df_contractArgsdf_param: name of the param of the function that is the input df
contract_params: dict defining the contract of the function in the following format:contract_dict = {
    "col_additions": {
        "col_a": "int",
        "col_b": "float"
    },
    "col_deletions": {
        "col_c",
        "col_d"
    },
    "col_editions": {
        "col_e",
        "col_f"
    },
    "allow_index_edition": False,
    "allow_drop_record": True
}which means that the function must create "col_a", "col_b", delete "col_c", "col_d", must
not modify any column data except "col_e", "col_f", and must not edit the indexhere is the list of keys allowed in this dict:col_additions: dict where keys are column names and values are dtypes (string)col_deletions: set of str representing the deleted columnscol_editions: set of str representing the modified columnsallow_index_edition: bool indicating if the function modify the indexallow_add_drop_record (bool): indicate if the function can drop some records (ex. when dropna is used)Usagewhen you have a function that takes a df as input:def super_func(df_input):
    ...just add the annotation to automatically check properties@input_df_contract(df_param="df_input", contract_dict={"col_editions": {"col_e","col_f"}})
def super_func(df_input):
    ...
Package: pandaSuit
pandaSuitExtension of thepandaslibrary to encapsulate some of the most used methods of querying and manipulating DataFrames. Also featuring reversible DataFrame operations, creation of plot and dashboard objects, and methods for producing regression models.The pandaSuit.DF class inherits from pandas.DataFrame, so a pandaSuit DF object can be treated as a pandas DataFrame. The additional features merely augment the core pandas DataFrame, or dress it up. Hence, apanda in a suit.How to install -PyPIpip install pandaSuitDependenciespandas>=1.3.4scikit-learn>=1.0.1matplotlib>=3.5.1ExamplesQueryingQuery DF object by column nameOr by index, possibly for rows and columnsEquivalent to existing pandas functionalityManipulationUpdate values at specific locationsUndo changes made to DF objectVisualizationCreate plots from DF objectsMake dashboards with multiple plotsAdd new plots to a dashboard
Package: pandas-units-extension
Extension pandas dtype and array for physical unitsWarning:Not fully compatible with pandas yet, especially not so for 1.0. Some operations may or may not work, while common ones should.HistoryOriginally created for PyCon CZ 2019 (and later BI FÃ³rum Budapest / PyData Cambridge the same year).Installationpipinstallpandas-units-extensionsFor development:pipinstall-e.Examplesimportpandasaspdimportpandas_units_extensionas_temps=pd.DataFrame({"city":["Prague","Kathmandu","Catania","Boston"],"temperature":pd.Series([20,22,31,16],dtype="unit[deg_C]")})temps["temperature"].units.to("deg_F")...df=pd.DataFrame({"distance":pd.Series([10,12,22,18],dtype="unit[km]"),"time":pd.Series([50,60,120,108],dtype="unit[min]")})speed=df["distance"]/df["time"]speed.units.to_si()Seedoc/units.ipynbfor more.Linkshttps://www.astropy.org/https://pint.readthedocs.io/en/0.10.1/pint-pandas.html- Another library supporting units inside pandas.
Package: pandas-usaddress
pandas-usaddressThe usaddress library made easy with Pandas.Also supports standardizing addresses to meet USPS standards.Installationpip install pandas-usaddressUsageBasic Parsingimport pandas as pd
import pandas_usaddress

#load dataframe
df = pd.read_csv('test_file.csv')

#initiate usaddress
df = pandas_usaddress.tag(df, ['address_field'])

#send output to csv
df.to_csv('parsed_output.csv')


#------------------------------additional details------------------------------

#Output and fields will be identical to usaddressParsing with Address Standardizationimport pandas as pd
import pandas_usaddress

#load dataframe
df = pd.read_csv('test_file.csv')

#initiate usaddress
df = pandas_usaddress.tag(df, ['address_field'], granularity='medium', standardize=True)

#send output to csv
df.to_csv('parsed_output.csv')


#------------------------------additional details------------------------------

#The standard output for usaddress has a lot of fields. The granularity parameter
#allows you to condense the results you get back for different types of analysis.
#see parameter documentation below for all granularity options.

#Addresses are often unstandardized. The same address can come as 123 1st ST, or
#123 First Street, etc. This can cause issues with analysis such as aggregation,
#or record matching. The standardize parameter attempts to standardize the address
#to US Postal Service (USPS) standards.Parsing with Address Standardizationimport pandas as pd
import pandas_usaddress

#load dataframe
df = pd.read_csv('test_file.csv')

#initiate usaddress
df = pandas_usaddress.tag(df, ['street1', 'street2', 'city', 'state'], granularity='single', standardize=True)

#send output to csv
df.to_csv('parsed_output.csv')


#------------------------------additional details------------------------------

#You can also use pandas-usaddress to concatenate and parse multiple address lines. 
#This can be helpful when you are working with two datasets that have different 
#field names and you want the field names to be standardized using a specific level of
#granularity. It's pretty common for instance that in one dataset will concatenate 
#address line 1 and 2, and another will not.

#You will help the parser do it's job if you try to concatenate fields in approximately
#same order that you would write them on an envelope.

#In this instance, we are taking multiple address fields and converting them into a
#single address line. That's fine to do!
Package: pandasUtilities
Pandas-UtilitiesPandas Utilities has some good attributes, functions and what not to make the developers task simpler.
Pandas Utilities is purely written in python3.What you can do using Pandas Utilities?Easy cleaning of Raw-DataExtra Details about DataFrameSingle line printingCount the number of Null Values for entire DataFrameDelete Row if you want(While most of the collumn is null in any row)Check Duplicate Rows in dataframeUpdate Labels of DataFrame directly according to coding guidlinesHow to use/install pythonUtilities?pythonUtilities is OS-independent and can work on python3 and above versions.
To Install pythonUtilities, you require "pip" installed on your machine.
If you don't have pip installed watch thisvideoto install it on your machine.
If you have pip installed then go ahead.
Go to your cmd/powershell/terminal and run the below command for the latest version.$pipinstallpythonUtilitiesOR$pipinstallpandasUtilities==0.0.1For the specific version...Future UpdatesThere are no any updates yet.LicenseMIT
Package: pandas-utility
Pandas UtilitySome useful Pandas utility functions.InstallationTo install Pandas Utility, run this command in your terminal:pipinstallpandas_utilityThis is the preferred method to install Pandas Utility,
as it will always install the most recent stable release.If you don't havepipinstalled,
thisPython installation guidecan guide you through the process.From sourcesThe sources for Pandas Utility can be downloaded from theGithub repo.You can either clone the public repository:gitclonegit://github.com/mmphego/pandas_utilityOr download thetarball:curl-OLhttps://github.com/mmphego/pandas_utility/tarball/masterOnce you have a copy of the source, you can install it with:pipinstall-U.UsageIn[1]:frompandas_utilityimportPandasUtilitiesasutils...:...:df=utils.create_random_df(3,5)In[2]:dfOut[2]:0123400.0560190.6080520.4346700.7123300.60279710.0509860.4587000.8992880.7834950.68317020.2329400.7071260.6398820.6752830.793030In[3]:df=utils.rename_cols(df,new_names=['col A','col B','col C','col D','col E'])In[4]:dfOut[4]:col_Acol_Bcol_Ccol_Dcol_E00.0560190.6080520.4346700.7123300.60279710.0509860.4587000.8992880.7834950.68317020.2329400.7071260.6398820.6752830.793030Oh, Thanks!By the way...
Click if you'd like tosaythanks... :) elseStarit.✨🍰✨FeedbackFeel free to fork it or send me PR to improve it.CreditsThis package was created withCookiecutterand themmphego/cookiecutter-python-packageproject template.
Package: pandas-utils-pkg
pandas-utils-pkgAn open source library for pandas and MySQL/MariaDB.PrerequisiteBefore you get started with the application code, here are some general tips and notes.To work on this project, you will need :Dockerfor the development environment.a text editor.We strongly recommend that you use VsCode. Indeed, the project uses Vscode's devcontainer which allows us to work in a Docker environment while having VsCode auto-completion.InstallationOnce Docker and VsCode are installed, if not already installed, you can download theRemote Development extension for VsCode. This extension will allow you to build and then launch the project.Good to knowYou will note that our project is currently in alpha. We already use this library on our internal projects.The project uses Pypi for installation.We are open to participation on this project.
Package: pandas-validate
pandas_validateA python package used for validating pandas dataframes.⚙️ Installationpython-mpipinstallpandas_validate🚀 Usage# Importsimportpandasaspdfrompandas_validateimportSchemafrompandas_validate.columnsimportIntColumn,TextColumn# Define your SchemaclassMySchema(Schema):IntField=IntColumn(min_value=3,max_value=10)TextField=TextColumn(min_length=3,max_length=5,pattern="^[a-c]+$")# Get your DataFramedf=pd.DataFrame({'IntField':[1,6,11,7],'TextField':['ab','abcd','ccbbaa','ccb'],'UnknownField':[1,2,3,4]})# Validate your DataFramevalidated_df,exceptions=MySchema.validate(df)Results>>>print(validated_df)IntFieldTextField0NaNNone16.0None2NaNNone37.0ccb>>>print(exceptions)columnrowvalueerrorerror_details0IntField0.01ColumnvalidationfailedThevalue1<31IntField2.011ColumnvalidationfailedThevalue11<102TextField0.0abColumnvalidationfailedThevalueabistooshort3TextField1.0abcdColumnvalidationfailedThevalueabcddoesnotmatchtheregularexpr...4TextField2.0ccbbaaColumnvalidationfailedThevalueccbbaaistoolong5UnknownFieldNaNNoneUnknownColumnThecolumn"UnknownField"isnotintheSchemaCode ContributorsThis project exists thanks to all the people who contribute. [Contribute].Current Contributors🤝 ContributingContributions, issues and feature requests are welcome.Feel free to checkissues pageif you want to contribute.Check the contributing guide.Author👤Larry GreenGithub:@larrygreen3Show your supportPlease ⭐️ this repository if this project helped you!📝 LicenseCopyright © 2023Larry Green.This project isMITlicensed.
Package: pandas-validation
pandas-validation is a small Python library for validating data
with the Python packagepandas.Source repository:https://github.com/jmenglund/pandas-validationDocumentation athttp://pandas-validation.readthedocs.ioInstallationFor most users, the easiest way is probably to install the latest version
hosted onPyPI:$ pip install pandas-validationThe project is hosted athttps://github.com/jmenglund/pandas-validationand
can also be installed using git:$ git clone https://github.com/jmenglund/pandas-validation.git
$ cd pandas-validation
$ python setup.py installRunning the testsTesting is carried out withpytest:$ pytest -v test_pandasvalidation.pyTest coverage can be calculated withCoverage.pyusing the following commands:$ coverage run -m pytest
$ coverage report -m pandasvalidation.pyThe code follow style conventions inPEP8, which can be checked
withpycodestyle:$ pycodestyle pandasvalidation.py test_pandasvalidation.py setup.pyBuilding the documentationThe documentation can be built withSphinxand theRead the Docs Sphinx Theme:$ cd pandas-validation
$ sphinx-build -b html ./docs/source ./docs/_build/htmlLicensepandas-validation is distributed under theMIT license.AuthorMarkus Englund,orcid.org/0000-0003-1688-7112
Package: pandas_validator
Validates the pandas object such as DataFrame and Series.
And this can define validator like django form class.Why bugs occur in Data Wrangling with pandasWhen we wrangle our data with pandas, We useDataFramefrequently.DataFrameis very powerfull and easy to handle.
ButDataFramehas no it’s schema, so It allows irregular values without being aware of it.
We are confused by these values and affect the results of data wrangling.pandas-schemaoffers the functions for validatingDataFrameorSeriesobjects and generating factory data.Overviewimportpandasaspdimportpandas_validatoraspvclassSampleDataFrameValidator(pv.DataFrameValidator):row_num=5column_num=2label1=pv.IntegerColumnValidator('label1',min_value=0,max_value=10)label2=pv.FloatColumnValidator('label2',min_value=0,max_value=10)validator=SampleDataFrameValidator()df=pd.DataFrame({'label1':[0,1,2,3,4],'label2':[5.0,6.0,7.0,8.0,9.0]})validator.is_valid(df)# True.df=pd.DataFrame({'label1':[11,12,13,14,15],'label2':[5.0,6.0,7.0,8.0,9.0]})validator.is_valid(df)# False.df=pd.DataFrame({'label1':[0,1,2],'label2':[5.0,6.0,7.0]})validator.is_valid(df)# FalseGetting StartedRequirementsSupport python version: 2.7, 3.4, 3.5, 3.6Support pandas version: 0.18, 0.19Installation$pipinstallpandas_validatorUsagePlease see the following demo written by ipython notebook.Demo in JapaneseDemo in EnglishLicenseThis software is licensed under the MIT License.ResourcesGithubPyPICHANGES0.5.0 (2017-01-06)Add LambdaColumnValidatorAdd IndexValidator.validate(df)method is deprecated. Please use.is_valid(df, raise_exception=True)0.4.0 (2015-10-28)Hot fix: cannot include source file0.3.2 (2015-10-28)Python 2.7, 3.2, 3.3, 3.4, 3.5 supportpandas 0.14, 0.15, 0.16, 0.17 support0.3.1 (2015-10-28)Update support python versionUpdate dependencies library version0.3.0 (2015-07-15)Critical bug fix0.2.0 (2015-05-24)Support char type validationflake8 testing0.1.0 (2015-05-22)Initial release.Support integer series validatorSupport float series validatorSupport dataframe validatorTesting on python2.7 and python 3.40.0.0 (2015-05-17)Create this project.
Package: pandas-vectors
These are a bunch of convenience functions to help with the use of
vectors stored in pandas dataframes.For example, if you have a dataframe with columns ofmy_vector_x,my_vector_yandmy_vector_zthen you find yourself writing code like
this:forvectorin['my_vector_x','my_vector_y','my_vector_z']:df[vector[:-2]+'_new'+vector[-2:]]=func(df[vector])Now, you can write:importpandas_vectorsaspvforvector,newinzip(pv.indexer('my_vector'),pv.indexer('my_vector_new')):df[new]=func(df[vector])In fact, you can simplify it more:df=pv.transform(df,'my_vector','_new',func)All the functions that take a vector as an input take a list of vectors.df=pv.magnitude(df,['my_vector','my_new_vector'])Functions that takedfas the first argument return the modifieddf.Don’t use_x,_yand_zfor your vector names? No problem.# Set the vector suffixes to the argument givenpv.set_vectornames(['_u','_v','_w'])# There are also some builtin shortcutspv.set_vectornames('xy')# ['_x', '_y']pv.set_vectornames('xyz')# ['_x', '_y', '_z']pv.set_vectornames('pyr')# ['_p', '_y', '_r']pv.set_vectornames('PYR')# ['_pitch', '_yaw', '_roll']This can also be set temporarily usingwith:pv.set_vectornames('xyz')withpv.vectornames('xy'):df=pv.magnitude(df,'my_vector','_magxy')# only xy magnitudedf=pv.magnitude(df,'my_vector','_mag')# xyz magnitudeInstallationpandas_vectorsis available in the PyPi repository aspandas-vectors.$pipinstallpandas-vectorsCHANGELOG0.1.1Bugfix on function/variable0.1Initial Release
Package: pandas-vet
pandas-vetpandas-vetis a plugin forflake8that provides opinionated linting forpandascode.Basic usageTake the following script,drop_column.py, which contains valid pandas code:# drop_column.pyimportpandasdf=pandas.DataFrame({'col_a':[iforiinrange(20)],'col_b':[jforjinrange(20,40)]})df.drop(columns='col_b',inplace=True)Withpandas-vetinstalled, if we run Flake8 on this script, we will see three warnings raised.$flake8drop_column.py

./drop_column.py:2:1:PD001pandasshouldalwaysbeimportedas'import pandas as pd'./drop_column.py:4:1:PD901'df'isabadvariablename.Bekindertoyourfutureself.
./drop_column.py:7:1:PD002'inplace = True'shouldbeavoided;ithasinconsistentbehaviorWe can use these to improve the code.# pandastic_drop_column.pyimportpandasaspdab_dataset=pd.DataFrame({'col_a':[iforiinrange(20)],'col_b':[jforjinrange(20,40)]})a_dataset=ab_dataset.drop(columns='col_b')For a full list, see theSupported warningspage of the documentation.MotivationStarting withpandascan be daunting. The usual internet help sites are littered with different ways to do the same thing and some features that the pandas docs themselves discourage live on in the API.pandas-vetis (hopefully) a way to help make pandas a little more friendly for newcomers by taking some opinionated stances about pandas best practices. It is designed to help users reduce the pandas universe.The idea to create a linter was sparked byAnia Kapuścińska's talk at PyCascades 2019,"Lint your code responsibly!". The package was largely developed at the PyCascades 2019 sprints.Many of the opinions stem fromTed Petrou'sexcellentMinimally Sufficient Pandas. Other ideas are drawn from pandas docs or elsewhere. ThePandas in Black and Whiteflashcards have a lot of the same opinions too.