Featured Post

How to Check Column Nulls and Replace: Pandas

Image
Here is a post that shows how to count Nulls and replace them with the value you want in the Pandas Dataframe. We have explained the process in two steps - Counting and Replacing the Null values. Count null values (column-wise) in Pandas ## count null values column-wise null_counts = df.isnull(). sum() print(null_counts) ``` Output: ``` Column1    1 Column2    1 Column3    5 dtype: int64 ``` In the above code, we first create a sample Pandas DataFrame `df` with some null values. Then, we use the `isnull()` function to create a DataFrame of the same shape as `df`, where each element is a boolean value indicating whether that element is null or not. Finally, we use the `sum()` function to count the number of null values in each column of the resulting DataFrame. The output shows the count of null values column-wise. to count null values column-wise: ``` df.isnull().sum() ``` ##Code snippet to count null values row-wise: ``` df.isnull().sum(axis=1) ``` In the above code, `df` is the Panda

Unix Special Keys That Improve Productivity

Shared the UNIX terminal shortcut keys. These special keys you can use to stop the program processing, or resume it.


Top Special keys in Unix


An example of a UNIX special key and its use.

Special Keys in UNIX much useful to take action when something happens.

A scenario where you made some mistake in the input command and you need to stop the further process. Then you can use the CTRL+C command. It is equal to the DELETE command.


Unix Keyboard Shortcuts or Special Keys.



RETURN key 

The RETURN key signifies the end of a line of input. On any terminal, RETURN has a key of its own, or return may be typed by holding down the control key and typing a 'm'.


CTRL-m Key


Hint: Ctrl-m command is equal to RETURN key in Unix systems


DELETE Key

The DELETE key stops a program/command immediately, without waiting for it to finish. DELETE can be achieved equivalently with ctrl-c.

Hint: Ctrl-c Command you can use to interrupt the process.


CTRL-s Key

Ctrl-s pauses the output and the program is suspended until you start it again.

Hint: Ctrl-s Command to pause the process


CTRL-q Key

Ctrl-q resumes the program paused by ctrl-s.

Hint: Ctrl-q Command to resume the process


CTRL-g Key

Rings a bell on the terminal.


CTRL-h key

Can be used for backspace.


CTRL-i Key

Can be used for tab (eight spaces on the UNIX system).

Comments

Popular posts from this blog

Explained Ideal Structure of Python Class

How to Check Kafka Available Brokers

6 Python file Methods Real Usage