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

10 Top Unix Disk Space Quiz Questions

I have listed 10 top Quiz questions on UNIX disk space. These questions help you to understand about disk-related concepts quickly.

Unix Disk Space QUIZ Questions.

Below listed 10 quiz questions help you to know the disk-space related concepts.

1. All devices are considered as files in Unix.

Yes

2. All device files are stored in /etc or in its subdirectories.

No

3. CD-ROM is a character device.

No

4. The printer is a character device.

Yes

5. The minor number represents the type of device.

No

6. The dd command is used for copying data from one medium to another.

Yes

7. The term bs in the dd command stands for block size.

Yes

8. The du utility displays complete information about the usage of disk space by each file and directory.

Yes

9. By default, the du command displays information in terms of 1024-byte blocks.

No

10. The df command reports only the free disk space of the file system installed on our machines.

Yes

Keep Reading

Comments

Popular posts from this blog

Explained Ideal Structure of Python Class

How to Check Kafka Available Brokers

6 Python file Methods Real Usage