【TryHackMe】Jupyter 101：Walkthrough

# 概要

TryHackMe「Jupyter 101」のWalkthroughです。

https://tryhackme.com/r/room/jupyter101

# Task5

## **Q1**.*What do "Cells" act like?*

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/3005822/83e2d7cb-6947-0dbf-f33d-128fde6c242e.png)

**A**.**Interpreter**

## **Q2**.*What would be the In[#] value of the first Cell when it is ran for the first time? (Where # would be the numerical value)*

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/3005822/a0ea3729-b6cc-7e9c-2170-904e0d362187.png)

**A**.**1**

## **Q3**.*What keyboard shortcut can you press to execute a cell?*

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/3005822/245cc93e-41e8-9713-7cff-6f4c6a92eaec.png)

**A**.**Shift + Enter**

## **Q4**.*If you was to execute the first Cell again, what would the value of In[#] now become? (Where # would be the numerical value)*

**Hint**.*Remember, Cells can be executed multiple times. All the In[] value represents is how many code executions or "steps" that have happened so far.*

実行すると`1`->`2`に変化しました。

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/3005822/a2caf68a-3353-7e14-c3af-11236cf880b2.png)

**A**.**2**

# Task7

## **Q1**.*What are the two main types of data within Pandas?*

**Hint**.****** and **********

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/3005822/b92545cc-31fb-0d0c-3012-d7544d2bfd3e.png)

**A**.**Series and Dataframes**

## **Q2**.*What is the name of the Pandas function that reads a CSV file?*

`read_csv`関数で読み込めます。

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/3005822/0f7c4663-19f8-2f62-8a2a-60e96ab7c142.png)

**A**.**read_csv**

## **Q3**.*Name the Pandas function you would use if you only wanted to display the first few rows*

`head(num)`関数で先頭から表示する行数を指定できます。

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/3005822/2b5aff5e-08db-eb17-a2a9-56ef5ad11d29.png)

**A**.**head**

## **Q4**.*Name the Pandas function you would use if you only wanted to display the last few rows*

`tail(num)`で最後の行から表示する行数を指定できます。

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/3005822/42d581da-2409-321b-a817-c4d28c609733.png)

**A**.**tail**

## **Q5**.*What Pandas function will give you a numerical count of the amount of columns and rows the dataset contains?*

**Hint**.*This is appended to when we display the csvfile!*

`shape`関数を使用できます。

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/3005822/be28255c-e550-c83d-508d-7716cbec360d.png)

**A**.**shape**

# Task8

## **Q1**.*How do you display a plot?*

**Hint**.*You'll need to include the brackets () for this!*

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/3005822/29af5b18-10d9-656d-f124-82fe78a0b8c6.png)

**A**.**plot()**

## **Q2**.*How would you label the "x" axis on a plot?*

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/3005822/84726dbc-7459-97c4-7ddd-fd00bba0a940.png)

**A**.**xlabel**

## **Q3**.*How would you label the "y" axis on a plot?*

**A**.**ylabel**

## **Q4**.*How would you add a "Title" to a plot?*

**A**.**title**

## **Q5**.*What word would you use to change the color of the plot?*

**Hint**.*British spelling! (Sorry Yankies...)*

`plot(color='')`で色を変更できます。

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/3005822/ca5cf3b1-a8a6-c07c-073e-7cfcb51df7ea.png)

**A**.**color**

## **Q6**.*How would you label the "z" axis on a plot?*

**Hint**.*We don't cover it in the Notebook, but think of how we label both the "x" and "y" axis.*

**A**.**zlabel**