df.count() counts the non-NaN (non-missing) values. The axis argument tells pandas the direction. axis=0 goes down the rows and gives one count for each column. axis=1 goes across the columns and gives one count for each row. df.count(axis=1) gives 2, 1, 1. That is one number for each row, and it counts only the real values. I ran this in Python to confirm. len(df) or df.shape[0]. The result of count is a Series with one entry per row, not a single number. So option 1 is wrong. df.shape[1]. count does not report this, and it gives one count per row, not per DataFrame. So option 3 is wrong. count ignores NaN values. It counts the opposite, the values that are not NaN. The NaN count would be df.isnull().sum(axis=1). So option 4 is wrong. Given the following DataFrame df:
| PNO | NAME |
|---|---|
| 111 | ROHAN |
| 222 | MEETA |
| 333 | SEEMA |
| 444 | SHALU |
| 555 | POONAM |
Select the correct commands from the following to display the last five rows:
Given the following series ser1:
| Index | Value |
|---|---|
| 0 | 69 |
| 1 | 80 |
| 2 | 20 |
| 3 | 50 |
| 4 | 100 |
| 5 | 70 |
State the output of the following command:
print(ser1 >= 70)
Which of the following are the correct commands to delete a column from the DataFrame df1?
Select the statements that are CORRECT regarding patterns of biodiversity.
Which of the following hormone is not produced by placenta ?
List - I | List - II | ||
| A | Streptokinase | I | Blood-Cholestrol lowering agents |
| B | Cyclosporin | II | Clot Buster |
| C | Statins | III | Propionibacterium sharmanii |
| D | Swiss Cheese | IV | Immuno suppressive agent |
Which of the following option determines percolation and water holding capacity of soils ?