Category Programming Languages

Connect with Postgres in python

In this article, you will learn how to connect with the Postgres database in python programming language. We are going to write the sample code for each step and then will explain that piece of code. In Python, it is… Continue Reading →

How to format output on the console in python program

In this article, we will learn how we can change the format of output display on the console in the python print command. You can use the below code snippet to achieve this. We are going to use the colour… Continue Reading →

Call Salesforce REST APIs using Python with OAuth

Many times we encounter the use cases when it becomes necessary or task can be done in a much effective way if we can connect directly with Salesforce using python or any other programming language. Here salesforce Rest APIs will… Continue Reading →

Install python in mac OS step by step

Step 1:Install Python with the help of homebrew. If it is not installed in your system. You can install it from here.https://mybeliefs.in/install-homebrew-package-manager-in-macos/ Step 2:Run the below command in the terminal to install python3 in your system. brew install python3

One hot encoding in python

If you are working in machine learning then I am sure you will need this code many times. Use the below piece of code for one hot encoding. cat_vars=[‘LeadSource’,’Products__c’,’Service_Offering__c’] for var in cat_vars: cat_list=’var’+’_’+var cat_list = pd.get_dummies(dataset2[var], prefix=var) dataset3=dataset3.join(cat_list) cat_vars=[‘LeadSource’,’Products__c’,’Service_Offering__c’]… Continue Reading →

Basics of Python

Web tool: (Install and run from here (http://jupyter.org/install.html)) jupyter notebook ———————————————————————————- pip install -r requirements.txt for python 3.x ————————————————————————————————— Ipython – interactive python ————————————————————————————————— Comments: Single line or multi-line: # Hi this is single line comment “””HI, this is multiline… Continue Reading →

Newer posts »

© 2024 My Beliefs

Write us at [email protected]