# 2023-01-31-NCL
## This document:
https://hackmd.io/@rseteam-ncl/2023-01-31-NCL
## Links:
* [Code Community](https://teams.microsoft.com/l/team/19%3aG79Rz7Mhk6rC0mhia04YCD-nj7WabLMxhnyb1YLp04A1%40thread.tacv2/conversations?groupId=7059214c-2200-4ad6-a739-9d350c74c7a9&tenantId=9c5012c9-b616-44c2-a917-66814fbe3e87)
* [Data](http://swcarpentry.github.io/python-novice-gapminder/files/python-novice-gapminder-data.zip)
* [JupyterHub](jupyter.ncldata.dev)
* [Pre-workshop survey](https://carpentries.typeform.com/to/wi32rS?slug=2023-01-17-NCL)
* [Post-workshop survey](https://carpentries.typeform.com/to/UgVdRQ?slug=2023-01-17-NCL)
* [Carpentries](https://carpentries.org/)
* [Code of Conduct](https://docs.carpentries.org/topic_folders/policies/code-of-conduct.html)
* [Workshop Website](https://nclrse-training.github.io/2023-01-17-NCL/)
* [Programming with Python](https://carpentries-incubator.github.io/python-novice-programming-gapminder/)
## Attendance:
## Notes
Variables = Letters, digits, numbers, but cannot start a variable with a number.
Python is case sensitive
Variable type is assigned by what you enter (string, integer, float, etc.)
Use quotes to assign variable to be a string
Can concatenate a string and a variable with +
Cannot use a variable until you have assigned something to it
!wget http://xxxx.filextension will get data from a URL
!unzip filname.zip to unzip
import - brings a library into the environment. import library as newvariablenameoflibrary
data = pd.read_csv('data'/gapminder_gdp_oceania.csv, index_col='country') assigns which column is index
data.info() tells you information about your dataframe, e.g. type
data.columns - column information
print(data.T) - transforms columns and rows like a pivot table
series = column for pandas library
data = pd.read_csv('data/gapminder_gdp_europe.csv', index_col='country')
print(data.iloc[0,0]) - gives value at co-ords 0,0 in the dataframe
print(data.loc['row name','column name'] to give data at location in the dataframe identified by headers
print(data.loc["Albania", :]) - everything in that row
print(data.loc["Italy":"Poland","gdpPercap_1962":"gdpPercap_1972"].max()) - Maximum values, can use for other statistical functions
print(type(data)) will give you how you can look for what functions are available so you can search on stack overflow
lists = similar to arrays