Saravanan666/pypi-org huggingface dataset:
Package: gshap
Generalized Shapley Additive Explanations (G-SHAP) is a technique in explainable AI for answering broad questions in machine learning.ApplicationsGeneral classification and regressionSuppose we have a black-box model which diagnoses patients with COVID-19, the flu, or a common cold based on their symptoms. Existing explanatory methods can tell us why our model diagnosed a patient with COVID-19. G-SHAP can answer broader questions, such ashow do the symptoms which distinguish COVID-19 from the flu differ from those which distinguish COVID-19 from the common cold?.Full analysishere.Intergroup differencesSuppose we have a black-box model which predicts a criminal’s risk of recidivism to determine whether they are eligible for parole. Existing explanatory methods can tell us why our model predicted that a criminal has a high recidivism risk. G-SHAP can answer broader questions, such aswhy does our model predict that Black criminals have higher recidivism rates than White criminals?.Full analysishere.Model performance and failureSuppose we have a black-box model which forecasts GDP growth based on macroeconomic variables. Existing explanatory methods can tell us why our model forecast 3% GDP growth in a given year. G-SHAP can answer broader questions, such aswhy did our model fail to forecast the 2008-2009 financial crisis?.Full analysishere.Installation$ pip install gshapQuickstartHere we train a support vector classifier to predict whether a criminal will recidivate within two years of release from prison. We use G-SHAP to ask why our model predicts that Black criminals are more likely to recidivate than non-Black criminals.importgshapfromgshap.datasetsimportload_recidivismfromgshap.intergroupimportIntergroupDifferencefromsklearn.svmimportSVCrecidivism=load_recidivism()X,y=recidivism.data,recidivism.targetclf=SVC().fit(X,y)g=IntergroupDifference(group=X['black'],distance='relative_mean_distance')explainer=gshap.KernelExplainer(clf.predict,X,g)explainer.gshap_values(X,nsamples=10)Out:array([ 0.01335252,  0.24884556,  0.00132373, -0.0025238 , -0.00151837,
    0.40453822,  0.01636782,  0.07666043, -0.00056414,  0.00966583])The sum of the G-SHAP values is the relative difference in predicted recidivism rates. The model predicts that Black criminals are 75% more likely to recidivate.The variables most responsible for this difference are number of prior convictions (index 5; 40%), age (index 1; 25%), and race (index 7; 8%).Citation@software{bowen2020gshap,
  author = {Dillon Bowen},
  title = {Generalized Shapley Additive Explanations},
  url = {https://dsbowen.github.io/gshap/},
  date = {2020-05-19},
}LicenseUsers must cite G-SHAP in any publications which use this software.G-SHAP is licensed with the MITLicense.
Package: gsheet
gsheets|PyPI version| |License| |Supported Python| |Format|gsheetsis a small wrapper around theGoogle Sheets API_ (v4)to provide
more convenient access toGoogle Sheets_from Python scripts.go togoogle console1.Create a Project in google cloud2.through Navigation menu Go ti API'S & Services and go to library3.search for google sheets api and enable it4.search for google drive api enable it and on the right side corner click on create credentials
select google drive api in which api you are using column and web server (eg node js tomcat) in  Where will you be calling the API from dropdown and tick on application data. and then no and press button5.fill any name in account and role select project and then editor and type json and submit. it will download the json file .6.open json file search client email go to google sheet you want to use and select share and give access to client email and send.LinksGitHub:https://github.com/manasgupta07/GsheetLibraries.. code:: bash$ pip install -r requirements.txtInstallationThis package runs under Python 2.7, and 3.6+, use pip_ to install:.. code:: bash$ pip install read-excelThis will also install google-api-python-client_ and its dependencies, notably
httplib2_ and oauth2client_, as required dependencies.QuickstartLog into theGoogle Developers Console_ with the Google account whose
spreadsheets you want to access. Create (or select) a project and enable theDrive APIandSheets API(underGoogle Apps APIs).Go to theCredentialsfor your project and createNew credentials>OAuth client ID> of typeOther. In the list of yourOAuth 2.0 client
IDsclickDownload JSONfor the Client ID you just created. Save the
file asclient_secrets.jsonin your home directory (user directory).import the library and load the data by passing the filename and json file downloaded from console it will return a dataframe and print top 5 rows of your data:.. code:: python>>> import read-excel as rf

>>> dataframe = rf.load_data(filename_of_your_sheet,json_path)For plotting the data you have to pass the dataframe you just loaded and pass the name X axis  columns name and Y axis column name it will plot the data for you:.. code:: pythonfor plotting
>>> plot_data(dataframe,"x-axis-column","y-axis-column")...
Package: gsheet-access
Project Descriptiongsheet_accessis a small wrapper around theGoogle Sheet (V4)to provide more convenient access to Google Sheets from Python scripts and plot the chart between two numerical columns . It containsgsheetmethod and it will take four arguments asoauth client ID as JSON file.Anyone can download the credentials file fromGoogle Cloud Platform, sheet id ,x-axis and y-axis in their method.InstallationThis package runs under 3.5+, usepipto install:$ pip install gsheet_accessThis will also installpandas,matplotlib,*oauth2client,gsheet,numpyas required dependenciesQuickStartLog into theGoogle Developers Consolewith the Google account whose spreadsheets you want to access. Create  a project and enable the  Sheets API (under Google Apps APIs).Learn How to create oauth credentials. Take sheet id from google sheet and required columns for plotting.import gsheet_access
gsheet_access.gsheet('1SrZfvr2ee54r7HR1jGtAE9zHIj_YUzK9ok8bdwkpqc','creds.json','average_sales','timestamp')SEE ALSOgspread â€“ Google Spreadsheets Python API (more mature and featureful Python wrapper, currently using the XML-based legacy v3 API)LICENSEThis package is distributed under theMIT license
Package: gsheet-alpa
GoogleSheetTODO: DocumentationThis is a module for working with the Google Sheet APISet-up Google Sheet API credentials based on this:https://towardsdatascience.com/google-sheets-pandas-dataframe-6b8666f9cf6Best Google Sheet API python module:
gspreadAdd support for Pandas Dataframe
gspread_dataframepip install gspread_dataframe gspread oauth2clientReferences:https://towardsdatascience.com/google-sheets-pandas-dataframe-6b8666f9cf6https://gspread.readthedocs.io/en/latest/https://gspread.readthedocs.io/en/latest/user-guide.html#creating-a-spreadsheethttps://pythonhosted.org/gspread-dataframe/https://stackoverflow.com/questions/45540827/appending-pandas-data-frame-to-google-spreadsheet
Package: gsheet-chart
Descriptiongsheet-chartis a library which helps to make a scatter plot between the two chosen columns from your google sheet.InstallationThis package runs under Python 3 and above,
You can usepipto install:pip install gsheet-chart==0.0.1This will also installpandas,gspread,oauth2client,matplotlibas required dependenices for the library.QuickStartAfter installing the library open the terminal typepython -m gsheet-chartThis will run the installed libraryStep 1:For any google sheet on your google drive for which you want to create a graph, share that sheet to thesunidhi@visualization-1602254198024.iam.gserviceaccount.comand disable notify people.Step 2:Enter the name of the file without any extensions.Step 3:Enter the name of the Worksheet in the file.Step 4:Enter the column names for which you want the graphs to be plotted between.Step 5:You wiil be shown a scatter plot between the two columns as specified and also the plot will be saved with namechart.jpgin the same folder where you have installed the library.GithubLicenseThis repository is licensed under the MIT License. SeeLICENSEfor details.
Package: gsheetgraph
Project Descriptiongsheetgraphis a small wrapper around theGoogle Sheetwhich provide the facility of ploting of graph by selecting the X-axes and Y-axes.The data of the sheet can also be manipulated using this package.Installationpip install gsheetgraphHow to use it?Import the package into the program.gsheetgraphcontain a modulegsheet_apiwhich contain the methods for ploting the graph as well as manipulating the data of the sheet.Once the module is imported it will ask to share theGoogle Sheetwith the provided address. In the backend the user file will be linked with theGoogle spread sheet api.
Once the file will succesfully shared the connection will be established to perform the task.Create the object for the connection:>>>fromgsheetgraphimportgsheet_apiasap>>>con=ap.gsheetconnection()Note: Once the object will be created it will ask to share google sheet with the provided address and also ask for the sheet name.Get all the data from sheet>>>con.getAllData()Get the data of a specified row and col# Accept the row number or col as an argument>>>con.getRowValues(2)>>>con.getColValues(4)Get the cell values# Accept the cell index as an argumet>>>con.getCellValues(2,3)Insert the data into the sheet# Accept row number and list of data to be inserted.>>>con.insertRow(3,[1,"abc"])Delete the Rows# Accepts start and end index to be deleted>>>con.deleteRow(2,4)Plot the Graph# Choose X-axes and y-axes>>>con.plotGraph()# After selecting the X-axesa and Y-axes choose the type of the graphMethods DescriptionMethodDescriptiongetAllData()print all the data present in sheet.getRowValues()print the row data of specified row.getColValues()print the data of specified column.getCellValues()print the data of specified cell. It accept row index and column index of cell.insertRow()Inserted the data into the sheet. It accept two argument row number and list of data to be inserted.deleteRow()Delete the rows. It accept the starting and end index of the sheet which need to be deleted.updateCell()Updates the cell value. It accept three argument row number, col number and value which need to be changed.plotGraph()Ask user to select the X-axes and Y-axes.plotLineChart()Once the X-axes and Y-axes will selected by selecting the type of the graph the function will be triggered.plotScatterPlot()Once the X-axes and Y-axes will selected by selecting the type of the graph the function will be triggered.ploltHistogram()Once the X-axes and Y-axes will selected by selecting the type of the graph the function will be triggered.plotBarChart()Once the X-axes and Y-axes will selected by selecting the type of the graph the function will be triggered.License
Â© 2020 Neeraj KumarThis package is distributed under theMIT license.
Package: gsheet-keyring
This package provides aKeyringbackend that stores passwords in a Google
Sheet.MotivationThis package allowsipython-secretsto be used on Google Colaboratory, and on
other hosted services that don’t support the standard Keyring backends.Theipython-secretspackage uses Keyring to store secrets for use in a Jupyter
notebook. However, none of the standard Keyring backends works inGoogle
Colaboratory, since that service provides neither durable file storage, nor
the native operating system services that the standard keyring backends require.UsageTo use this package, install it viapip3 installgsheet-keyring, and use theKeyring APIas normal. If one of the built-in Keyring backends is available,
Keyring will use that backend in preference to this one (as it should). However,
if a platform-specific backend is not available, Keyring will automatically
detect and use this package instead.Usekeyring.set_keyringto force Keyring to use this package even, if other
backends are available:importkeyringfromgsheet_keyringimportGoogleSheetKeyringkeyring.set_keyring(GoogleSheetKeyring())By default, this backend searches for a Google Sheet named “keyring”. If there’s
no sheet with this name, one is created.You can override this default by specifying a Google Sheet name, a Google Sheet
key, or aWorksheetfrom thegspreadpackage.AlternativesIf you’re running in an environment where any other Keyring backend is
available, use that instead. (This should happen automatically.)If you require either greater performance or security than this package provides
(see the notes in the API documentation), you probably want to instead create or
use a backend that uses a secret management service suchAWS Secrets Manager,Google Cloud AMS, or orHashicorp Vault.Thekeyring-vault-backend packageis a Keyring backend
interface to Hashicorp Vault. I haven’t used it.LicenseMIT
Package: gsheet-pandas
Google sheet & Pandas intergationPackagegheet-pandasallows you to easily get Pandas dataframe from Google Sheets or upload dataframe to the Sheets.InstallationInstall using pip:pip install gsheet-pandasSet up environmentEnable the APIBefore using Google APIs, you need to turn them on in a Google Cloud project. You can turn on one or more APIs in a single Google Cloud project.
In the Google Cloud console, enable the Google Sheets API.Enable the APIAuthorize credentials for a desktop applicationTo authenticate as an end user and access user data in your app, you need to create one or more OAuth 2.0 Client IDs. A client ID is used to identify a single app to Google's OAuth servers. If your app runs on multiple platforms, you must create a separate client ID for each platform.In the Google Cloud console, go toMenu > APIs & Services > Credentials.Go toCredentialsClickCreate Credentials > OAuth client ID.ClickApplication type > Desktop app.In theNamefield, type a name for the credential. This name is only shown in the Google Cloud console.ClickCreate. The OAuth client created screen appears, showing your new Client ID and Client secret.ClickOK. The newly created credential appears underOAuth 2.0 Client IDs.Save the downloaded JSON file ascredentials.json, and move the file to your working directory.UsagePandas extensionFirst, callsetupmethod to register your credentials and initialize pandas extensions:frompathlibimportPathimportgsheet_pandassecret_path=Path('/path/to/my/secrets/').resolve()gsheet_pandas.setup(credentials_dir=secret_path/'credentials.json',token_dir=secret_path/'token.json')To download dataframe:importpandasaspddf=pd.from_gsheet(drive_table=table_name,sheet_name=sheet_name,range_name='!A1:C100')# Range in Sheets; OptionalDefaultrange_nameis'!A1:ZZ900000'.To upload dataframe:df.to_gsheet(drive_table=table_name,sheet_name=sheet_name,range_name='!B1:ZZ900000',# Range in Sheets; Optionaldrop_columns=False)# Upload column names or not; OptionalDriveConnection instanceFirst, init DriveConnection instance:fromgsheet_pandasimportDriveConnectionsecret_path=Path('/path/to/my/secrets/').resolve()drive=DriveConnection(credentials_dir=secret_path/'credentials.json',token_dir=secret_path/'token.json')To download dataframe:df=drive.download(drive_table=table_name,sheet_name=sheet_name,range_name='!A1:C100',# Range in Sheets; Optionalheader=0)# Column rowDefaultrange_nameis'!A1:ZZ900000'.To upload dataframe:df=drive.upload(df,drive_table=table_name,sheet_name=sheet_name,range_name='!B1:ZZ900000',# Range in Sheets; Optionaldrop_columns=False)# Upload column names or not; Optional
Package: gsheet-player
Google Sheet Tennis Playergsheet-player is a Python library for dealing with a Google Sheet of tennis
player information.InstallationUse the package managerpipto install gsheet-player.pipinstallgsheet-playerUsageimportgsheet-player# Given information about a Google Sheet in this dictionarygsheet={"spreadsheetId":"1eUR2RpS-yvA8cb-IlwHqmfphHgaKb2SXXREaYEPJrMU","sheetId":"1088338784","sheetName":"Members",}# read_gsheet returns all rows in a list of listsall_rows=read_gsheet(ssm_client,gsheet["spreadsheetId"],gsheet["sheetName"]+"!A1:N800")# read_gsheets returns a dictionary with one value as key and the gsheetPlayer object as valuegsheetPlayers=read_gsheets(gsheet,all_rows)ContributingPull requests are welcome. For major changes, please open an issue first
to discuss what you would like to change.Please make sure to update tests as appropriate.LicenseMIT
Package: gsheet-plotter
GSheet PlotterAn interface to plot graphs using data from your Google Spreadsheets.Features:Fetch spreadsheet from IDPlot 2D graphs using any two columnsExport graphs in .pngQuick Links to get up and runningInstallationUsageAvailable MethodsInstallation:Install GSheet Plotterpipinstallgsheet_plotterCreate a credentials file(.json) to allow access to GSheet Plotter to access your spreadsheets.Go toGoogle-Developer-Consoleand login with your Google account.In the left pane click onCredentialsClick onCreate CredentialsIn the dropdown, chooseService AccountFill in the details, and click onCreateClick onDoneGo back to your dashboard and you'll see new credentials added with the information you entered.Click on theEditiconGotoKeysonAdd Key.Download theJSONfile and move to the working directory.Usage:Instantiate the class by passing Google Service Account json file,Sheet Id found in the Google Sheet URL and the work sheet nameFetch data from the sheet to a pandas dataframe. The dataframe is saved in thedataattribute.Plot the graph by using two column namesAdditional method- Fetch the data and plot the graph in one go by passing the column listAvailable methods
Package: gsheetquery
GSheetQueryGSheetQuery is a python library for using Google Sheets as a document database.  It modeled after pymongo's interface.OverviewFor small projects, full Python frameworks can be overkill (Django).  Especially if you want code up and running quickly.  Google Sheets can be leveraged as a database and made accessible by GSheetQuery.This library will allow users to interact with google sheets as a document database similar to MongoDB.InstallInstall usingpip install gsheetqueryin your preferred command line.  Import to your python files like any other module.QuickstartfromgsheetqueryimportClient,Collection# Initialize the client objectclient=Client()# Create a new databasedatabase=client.create_database("my_new_database")# Add a new collection to the databasenew_collection=database['new-collection']# List the collections in the databasecollection_names=database.list_collection_names()print("Collections in the database:",collection_names)# Add a doc to the collectionnew_doc={"name":"Bob","age","30"}new_collection.insert_one(new_doc)# Query the collectionnew_collection.find_one({"age":"30"})# Delete the databaseclient.drop_collection('new-collection')
Package: gSheetsDataExtractor
gSheetsDataExtractorExtracts data from google sheets and plots a chart with the values on the sheet. This library also gives the user an option to select the columns for x-axis and y-axisInstallationUsepipto install the packagePython Version supportThis package runs aunder python 3.6 and above versions$ pip install gSheetsDataExtractorQuickstartSign into theGoogle Drivewith the your Google account
Open the spreadsheet you want to access and get theSpreadSheet IDfrom the linkExamplehttps://docs.google.com/spreadsheets/d/`1SrZfvr2ee54r7HR1jGtAE9zHIj_Y-UzK9ok8bdwkpqc`/edit#gid=0The highlighted part in the above link will be the SpreadSheet IDimport the library and provide the input to the spreadSheetId and spreadSheetName:spreadSheetName can be any string withoutspace>>> import gSheetsDataExtractor as de
    >>> spreadSheetId = input()
    >>> spreadSheetName = input()For extracting the data and for plotting the chart with the values on the sheet, call the function extractData with googleSheetId and spreadSheetName as shown below:>>> de.extractData(spreadSheetId, spreadSheetName)This prints the column names of the spreadsheet and gives the user to select the columns for x-axis and y-axis and plots the graph with the column names given by user.LicenseThis package is distributed under theMIT license.
Package: gsheets-db-connector
Google Sheets ConnectorConnects Google sheets to a database to transfer information to and fro.Fyleis an expense management system.InstallationThis project requiresPython 3+.Download this project and use it (copy it in your project, etc).Install it frompip.$ pip install gsheets-db-connectorUsageThis connector is very easy to use.First you'll need to create a connection using the main class FyleSDK.fromgsheets_db_connectorimportGoogleSheetsConnectorconfig={'gsheets_credentials':'<Credentials>','sheet_name':'<Sheet Name>'}gsheets_connector=GoogleSheetsConnector(config,database_connection)After that you'll be able to extract/load datagsheets_connector.extract_data()ContributeTo contribute to this project follow the stepsFork and clone the repository.Runpip install -r requirements.txtSetup pylint precommit hookCreate a file.git/hooks/pre-commitCopy and paste the following lines in the file -#!/usr/bin/env bashgit-pylint-commit-hookRunchmod +x .git/hooks/pre-commitLicenseThis project is licensed under the MIT License - see theLICENSEfile for details
Package: gsheets-plaid
GSheets-PlaidA spring break project to get my bank transaction data in Google Sheets without using Google Apps Script.gsheets-plaidis a tool for getting your raw bank transaction data into a Google Sheets spreadsheet, to enable you to make your own formulas and charts for tracking spending, making goals, etc. This app is 100% free (assuming you don't already have a bunch of Google Cloud projects), but there is a bit of one-time setting up to do to get your Google and Plaid credentials in place.TheTUTORIALcontains all the instructions to get you from a fresh install of the package to bank transactions in a Google Sheets file.Please open an issue if something isn't working or if the documentation isn't clear.Publishing new releases(for maintainers)Tag the main branchgit tag v[insert-version-here]Push latest commits with tagsgit push origin --tagsBuild repopython -m buildUpload distribution archives to PyPipython -m twine upload dist/*Create new release on GitHub
Package: gsheetz
GSheetzGSheetz is a small package that I made while trying to connect to the google sheets API. It was really annoying so I made a few classes and functions to make it easier.The easiest way to use it is through theget_viewfunction and theSheetViewclass. This package is really for personal use so I'm not going to spend much time on documentation for now, but if the project expands I'll maybe do stuff to make it legible and stuff like that.Here's some example usage:fromgsheetz.viewsimportSheetViewTOKEN='token.json'# Path of token fileSECRET='client_secret.json'# Path of client secret fileSCOPES='https://www.googleapis.com/auth/spreadsheets'# Scopes variable as defined by APIsheetID='1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms'# Sheet IDsheetName='Class Data'# SheetView is the default so you don't technically need to import itview=SheetView.get_view(TOKEN,SECRET,SCOPES)df=view.view_sheet(sheetID,sheetName)# View the sheet - This loads the sheet,# stores it in a pandas DataFrame at view.localdf,# formats it (if you override the format_sheet method),# sets view.current = sheetID and view.sheet = sheetName, and then returns the DataFrameAs you can see, the point of this package is to take care of the boiler-plate for you. If you'd like to interact with the API yourself, simply callget_view(TOKEN,SECRET,SCOPES).apito get access to the API object (service.spreadsheets()).Future Plans (in arbitrary order)Dynamically update thelocaldfattribute ofSheetViewobjects instead of just 'refreshing' it.Add support for editing multiple rangesEventually change the architecture for the connection module to use something besidesoath2client(it's been deprecated)Add functionality to load a range instead of a whole sheetWrite documentationSourcesGoogle Sheets API- The docs for the APIGuide and Quickstart- I literally copy-pasted the python code from this and separated it into multiple functions. I tried figuring out how to usegoogle.authbut figured it wasn't worth the extra time to parse through all the docs when the code is already written for meGoogle Sheets API for Python Developers- the docs that explain how to use the python methods