What is a Digital Certificate and Digital Signature?

Bhanu Priya
Updated on 15-Sep-2021 07:49:04

4K+ Views

Let us begin by learning about the digital certificate.Digital CertificateIt is basically a certificate issued digitally, issued to verify a user's authenticity i.e., verifying the user sending a message is who he or she claims to be, and also to provide the receiver with the means to encode a reply.Whoever wants to or an individual who wants to send encrypted messages applies for a digital certificate from a Certificate Authority (CA).Need of digital certificateThe digital certificate allows entities to share their public key in an authenticated way. They are used in initializing and establishing secure SSL (Secure Sockets Layer) connections ... Read More

Find Uncommon Rows Between Two DataFrames in Python Pandas

AmitDiwan
Updated on 15-Sep-2021 07:48:17

3K+ Views

To find the uncommon rows between two DataFrames, use the concat() method. Let us first import the required library with alias −import pandas as pdCreate DataFrame1 with two columns −dataFrame1 = pd.DataFrame( { "Car": ['BMW', 'Lexus', 'Audi', 'Tesla', 'Bentley', 'Jaguar'], "Reg_Price": [1000, 1500, 1100, 800, 1100, 900] } )Create DataFrame2 with two columns −dataFrame2 = pd.DataFrame( { "Car": ['BMW', 'Lexus', 'Audi', 'Tesla', 'Bentley', 'Jaguar'], "Reg_Price": [1000, 1300, ... Read More

Symmetric and Asymmetric Key Encryptions Explained

Bhanu Priya
Updated on 15-Sep-2021 07:47:02

2K+ Views

Let us understand the symmetric key encryption.Symmetric Key encryptionSymmetric-key encryption algorithms in cryptography use a single key or the same cryptographic keys (secret key) shared between the two parties for both encrypting plain-text and decrypting cipher-text. The keys could be identical or there could be a simple change to go between the two keys.It uses Diffie–Hellman key exchange or other public-key protocol to securely agree upon the sharing and usage of a fresh new secret key for each message.Asymmetric Key encryptionAsymmetric key encryption is an encryption technique using a pair of public and private keys to encrypt and decrypt plain-text ... Read More

Differentiate Between SSL and TLS Secure Layers

Bhanu Priya
Updated on 15-Sep-2021 07:45:21

601 Views

Secure Socket Layer (SSL) and Transport security layer (TSL) are internet security protocols used for secured communication between the web-browser and the webserver. SSL is the predecessor of TLS so logically TLS is more secure than SSL.DifferencesLet us discuss the differences between SSL and TSL in point wise manner −Point 1TLS establishes communication in two steps.Step 1 − Handshaking to authenticate the server &Step 2 − Actual message transfer.So, it’s slower than SSL.Point 2TLS is based on the SSL v3.0 protocol with some enhancements.SSL was developed with communication needs and related issues.Point 3TLS v1.0 is prone to BEAST attacks but ... Read More

ESP in Tunnel and Transport Mode: Difference Between AH and ESP

Bhanu Priya
Updated on 15-Sep-2021 07:42:58

6K+ Views

Encapsulating Security Payload (ESP) provides all encryption services in IPSec based on integrity for the payload and not for the IP header, confidentiality and authentication that using encryption, without authentication is strongly discouraged because it is insecure.Any translations in readable message format into an unreadable format are encrypted and used to hide the message content against data tampering.IPSec provides an open framework, such as SHA and MD5 for implementing industry standard algorithms.Encryption/decryption allows only the sender and the authorized receiver to make the data to be received in readable form and only after the integrity verification process is complete, the ... Read More

Shift Column in a Pandas DataFrame

Rishikesh Kumar Rishi
Updated on 15-Sep-2021 07:23:13

8K+ Views

We can use the shift() method in Pandas to shift the columns of a DataFrame without having to rewrite the whole DataFrame. shift() takes the following parametersshift(self, periods=1, freq=None, axis=0, fill_value=None)periods  Number of periods to shift. It can take a negative number too.axis  It takes a Boolean value; 0 if you want to shift index and 1 if you want to shift columnfill_value  It will replace the missing value.Let's take an example and see how to use this shift() method.StepsCreate a two-dimensional, size-mutable, potentially heterogeneous tabular data, df.Print the input DataFrame, df.Select a column and shift it by using df["column_name]=df.column_name.shift()Print ... Read More

Find Numeric Columns in Pandas

Rishikesh Kumar Rishi
Updated on 15-Sep-2021 06:52:03

7K+ Views

To find numeric columns in Pandas, we can make a list of integers and then include it into select_dtypes() method. Let's take an example and see how to apply this method.StepsCreate a two-dimensional, size-mutable, potentially heterogeneous tabular data, df.Print the input DataFrame, df.Make a list of data type, i.e., numerics, to select a column.Return a subset of the DataFrame's columns based on the column dtypes.Print the column whose data type is int.Example import pandas as pd df = pd.DataFrame( dict( name=['John', 'Jacob', 'Tom', 'Tim', 'Ally'], ... Read More

Query the Columns of a DataFrame in Python Pandas

AmitDiwan
Updated on 14-Sep-2021 15:22:09

449 Views

To query the columns of a Pandas DataFrame, use the query(). We are querying to filter records. At first, let us create a Pandas DataFramedataFrame = pd.DataFrame({"Product": ["SmartTV", "PenDrive", "Speaker", "Earphone"], "Opening_Stock": [300, 700, 1200, 1500], "Closing_Stock": [200, 500, 1000, 900]})Using query() to query columns with conditions −print(dataFrame.query('Opening_Stock >=500 & Closing_Stock < 1000 & Product.str.startswith("P").values'))ExampleFollowing is the complete code −import pandas as pd dataFrame = pd.DataFrame({"Product": ["SmartTV", "PenDrive", "Speaker", "Earphone"], "Opening_Stock": [300, 700, 1200, 1500], "Closing_Stock": [200, 500, 1000, 900]}) print"DataFrame...", dataFrame # using query() to query columns print"Querying columns to filter records..." print(dataFrame.query('Opening_Stock >=500 & Closing_Stock ... Read More

Select Multiple Rows from a DataFrame in Python Pandas

AmitDiwan
Updated on 14-Sep-2021 15:14:34

3K+ Views

To select multiple rows from a DataFrame, set the range using the : operator. At first, import the require pandas library with alias −import pandas as pdNow, create a new Pandas DataFrame −dataFrame = pd.DataFrame([[10, 15], [20, 25], [30, 35], [40, 45]], index=['w', 'x', 'y', 'z'], columns=['a', 'b'])Select multiple rows using the : operator −dataFrame[0:2]ExampleFollowing is the code −import pandas as pd # Create DataFrame dataFrame = pd.DataFrame([[10, 15], [20, 25], [30, 35], [40, 45]], index=['w', 'x', 'y', 'z'], columns=['a', 'b']) # DataFrame print"DataFrame...", dataFrame # select rows with loc print"Select rows by passing label..." print(dataFrame.loc['z']) ... Read More

Select a Column from a Pandas DataFrame in Python

AmitDiwan
Updated on 14-Sep-2021 15:12:08

1K+ Views

To select a column from a DataFrame, just fetch it using square brackets. Mention the column to select in the brackets and that’s it, for exampledataFrame[‘ColumnName’]At first, import the required library −import pandas as pdNow, create a DataFrame. We have two columns in it −dataFrame = pd.DataFrame( { "Car": ['BMW', 'Lexus', 'Audi', 'Mustang', 'Bentley', 'Jaguar'], "Units": [100, 150, 110, 80, 110, 90] } )To select only a single column, mention the column name using the square bracket as shown below. Here, our ... Read More

Advertisements