ESIMERKKI: Lämpötiloista ja anomalioista#

Työn rakenne#

Yksinkertainen projekti noudattaa yleensä simppeliä perusrakennetta:

  1. Määritetään kiinnostuksen kohde (tutkimuskysymys)

  2. Etsitään aineistoa (datankeruu)

  3. Tarkastellaan löydöksiä (analyysi)

  4. Arvioidaan, kritisoidaan (tulokset ja johtopäätökset)

  5. Selitetään tarpeen mukaan käytetyt aineistot (lähteet)

1. Tutkimuskysymys#

Globaaleja ilmastotilastoja esitetään usein varsinaisten mitattujen lämpötilojen sijaan lämpötila-anomalioina, eli poikkeamina jostain valitusta pohjatasosta. Tämä on yleensä keskiarvo 30-vuotisjaksolta tai kokonaiselta vuosisadalta.

(Kuva NASA:n Earth Observatory -sivuilta.)

Miten hyvin tällainen suurten linjojen kuvaus pätee pienemmällä, paikallisella tasolla? Kokonaisen planeetan tai edes pallonpuoliskon tarkastelu yhdellä kertaa muokkaa varmasti luonteensa vuoksi havaintojen muotoa, koska kyseessä on useiden paikkojen yhdistelmä, mutta onko niissä kuitenkin havaittavia yhteneväisyyksiä?

Vertaillaan kansainvälisten instituuttien (NASA, NOAA, JMA, MetOffice) globaaleja havaintoja suomalaisiin Ilmatieteen laitoksen mittauksiin.

2. Aineisto#

YK:n ympäristöohjelman sivuilta (https://data.unep.org/climate/essential-climate-variables-ecv/global-temperature-change) löytyy näppärästi materiaalia jota verrata FMI:n latauspalvelusta saataviin materiaaleihin (https://www.ilmatieteenlaitos.fi/havaintojen-lataus).

# Tuodaan tarvittavat työkalukirjastot.

import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
# Tuodaan halutut aineistot käyttöön nimettyinä muuttujina.

# Globaalit mittaukset.
data = pd.read_csv("https://raw.githubusercontent.com/opendata-education/Tyopajat/main/materiaali/data/global-surface-temperature.csv") 

# Helsingin Kaisaniemen mittaukset.
KLam = pd.read_csv("https://raw.githubusercontent.com/opendata-education/Biologia/main/materiaali/data/KeskLam.txt", sep = "\t")
# Tarkastellaan miltä aineistot näyttävät.

data.head()
Category NOAA National Climatic Data Center NASA Goddard Institute for Space Studies Japanese Meteorological Agency Met Office Hadley Centre/Climatic Research Unit
0 1880 -0.20 -0.17 NaN -0.25
1 1881 -0.16 -0.09 NaN -0.17
2 1882 -0.16 -0.11 NaN -0.23
3 1883 -0.25 -0.18 NaN -0.28
4 1884 -0.34 -0.28 NaN -0.43
KLam.head()
Vuosi Tammi Helmi Maalis Huhti Touko Kesä Heinä Elo Syys Loka Marras Joulu
0 1844 NaN NaN NaN NaN NaN NaN 14.3 16.0 11.6 5.9 -2.1 -7.3
1 1845 -1.4 -12.2 -8.9 -0.3 5.8 12.8 16.5 16.2 11.0 3.9 2.6 -2.7
2 1846 -8.1 -11.4 -0.2 2.1 6.5 13.1 17.2 20.6 11.2 8.4 1.6 -6.5
3 1847 -4.4 -11.1 -5.4 -2.4 6.6 14.6 15.5 18.0 13.0 5.0 4.1 -0.5
4 1848 -10.8 -3.6 -1.0 3.9 8.4 13.2 14.5 14.3 10.7 5.8 0.7 -2.9

3. Analyysi#

Molemmat muuttujat sisältävät nyt Celsius-asteina taulukoituja tietoja 1800-luvulta nykypäivään. Kaisaniemen aseman tiedot ovat kuukausittaisia keskiarvoja, muut vuosittaisia. Korjataan asia laskemalla vuosiarvot Kaisaniemen tiedoista.

# Tämän solun ajaminen nostaa huomautuksen, älä välitä.
# Tehdään uusi, tyhjä sarake KLam-muuttujaan.

la = np.zeros(len(KLam))
KLam["KA"] = la

# Käydään tiedot rivi kerrallaan läpi, asettaen äskeiseen uuteen sarakkeeseen arvo. Mikä arvo?
# Miten siihen vaikuttaa, mikäli tietoaineistossa on puuttuvia kohtia (NaN, not a number)?
  
for i in range(len(KLam)):
    KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
    +KLam["Kesä"][i]+KLam["Heinä"][i]+KLam["Elo"][i]+KLam["Syys"][i]+KLam["Loka"][i]
    +KLam["Marras"][i]+KLam["Joulu"][i])/12
    
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]
/tmp/ipykernel_1945/1083255172.py:11: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  KLam["KA"][i] = (KLam["Tammi"][i]+KLam["Helmi"][i]+KLam["Maalis"][i]+KLam["Huhti"][i]+KLam["Touko"][i]

Miltä muuttuja KLam nyt näyttää? Kirjoita alle koodisoluun jotain joka näyttää sen.

Tarkastellaan ensin yksinkertaisesti miltä vuositietomme näyttävät piirtämällä kuvaajat molemmista muuttujista.

# Globaali tilanne.

plt.figure(figsize = (20,10))

plt.plot(data["Category"], data["NOAA National Climatic Data Center"],
         label = "NOAA National Climatic Data Center")
plt.plot(data["Category"], data["NASA Goddard Institute for Space Studies"],
         label = "NASA Goddard Institute for Space Studies")
plt.plot(data["Category"], data["Japanese Meteorological Agency"],
         label = "Japanese Meteorological Agency")
plt.plot(data["Category"], data["Met Office Hadley Centre/Climatic Research Unit"],
         label = "Met Office Hadley Centre/Climatic Research Unit")

plt.axhline(0, linestyle='--', label = "Globaali vertailuarvo 1910-2000", color='k', alpha = 0.5)

plt.title("Globaali lämpötila-anomalia maanpinnalla 1880-2022 \n", fontsize = 20)
plt.ylabel("Poikkeama (°C)", fontsize = 20)
plt.xlabel("Vuosi", fontsize = 20)
plt.legend(fontsize = 20)
plt.show()
../_images/3772c15cec625e5172c9b1aef470c4ac90396bbe9e4d224e2d6f33495f0f986b.png
# Helsingin tilanne.

plt.figure(figsize = (20,10))

plt.scatter(KLam["Vuosi"], KLam["KA"], label = "Kaisaniemi")
plt.plot(KLam["Vuosi"], KLam["KA"], c = "y", alpha = 0.5)

plt.title("Lämpötila Helsingin Kaisaniemessä 1844-2020 \n", fontsize = 20)
plt.ylabel("Lämpötila (°C)", fontsize = 20)
plt.xlabel("Vuosi", fontsize = 20)
plt.legend(fontsize = 20)
plt.show()
../_images/c2dcb2e6755bfbfebc388326d678a1b1522265daa4210634db86cd76ce30f94f.png

Nyt meillä on globaalisti poikkeamat vuosien 1910-2000 keskiarvosta mutta mitatut (instrumentaaliset) arvot Kaisaniemestä, eli kuvaajia ei voi ihan hyvällä omallatunnolla verrata suoraan toisiinsa.

Miten saamme aikaan vastaavan pohjatason Kaisaniemen tiedoista? Koodaa alle.

# Esimerkkinä .query()-käskyllä
val = KLam.query("(Vuosi > 2012) and (Vuosi < 2015)") 
# saataisiin val-muuttujaan pala alkuperäisestä taulukosta, jossa olisi vain vuosien 2013 tai 2014 tiedot.
# Valitusta muuttujasta, jossa on yhä kaikki alkuperäiset sarakkeet, voidaan sitten
# ottaa keskiarvosarakkeesta pitkän ajan keskiarvo talteen. Tarkkana nimien kanssa.
UusiNimi = VanhaNimi["Sarakkeen nimi"].mean()

Kun olet saanut laskettua Kaisaniemelle vertailupohjan, tehdään sen avulla anomaliakuvaaja.

# Napataan koko aineiston vuosiarvot kopiona uudeksi pätkäksi, jonka jokaisesta rivistä
# vähennetään vertailuajan pohja pois, eli ajetaan tulosta kohti nollaa kuten globaaleissakin
# tiedoissa oli.
Kaisa = KLam["KA"].copy()
Kaisa -= UusiNimi

Piirretään kaikki viisi käyrää samaan kuvaajaan!

plt.figure(figsize = (30,10))
plt.plot(data["Category"], data["NOAA National Climatic Data Center"],
         label = "NOAA National Climatic Data Center")
plt.plot(data["Category"], data["NASA Goddard Institute for Space Studies"],
         label = "NASA Goddard Institute for Space Studies")
plt.plot(data["Category"], data["Japanese Meteorological Agency"],
         label = "Japanese Meteorological Agency")
plt.plot(data["Category"], data["Met Office Hadley Centre/Climatic Research Unit"],
         label = "Met Office Hadley Centre/Climatic Research Unit")

plt.plot(KLam["Vuosi"], Kaisa, label = "Kaisaniemi")

plt.axhline(0, linestyle='--', label = "Globaali vertailuarvo 1910-2000", color='k', alpha = 0.5)

# Jos haluat hifistellä kuvaajaasi myös keskihajontarajat, laske hajo = np.std(Kaisa) mukaan. 
# plt.axhline(hajo, linestyle='--', label = "Kaisaniemen keskihajonta $\sigma$" , color='y', alpha = 0.3)
# plt.axhline(-hajo, linestyle='--', color='y', alpha = 0.3)

plt.title("Globaali lämpötila-anomalia maanpinnalla 1880-2022 \n", fontsize = 25)
plt.ylabel("Poikkeama (°C)", fontsize = 20)
plt.xlabel("Vuosi", fontsize = 20)
plt.legend(fontsize = 20)
plt.show()
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
Cell In[8], line 11
      6 plt.plot(data["Category"], data["Japanese Meteorological Agency"],
      7          label = "Japanese Meteorological Agency")
      8 plt.plot(data["Category"], data["Met Office Hadley Centre/Climatic Research Unit"],
      9          label = "Met Office Hadley Centre/Climatic Research Unit")
---> 11 plt.plot(KLam["Vuosi"], Kaisa, label = "Kaisaniemi")
     13 plt.axhline(0, linestyle='--', label = "Globaali vertailuarvo 1910-2000", color='k', alpha = 0.5)
     15 # Jos haluat hifistellä kuvaajaasi myös keskihajontarajat, laske hajo = np.std(Kaisa) mukaan. 
     16 # plt.axhline(hajo, linestyle='--', label = "Kaisaniemen keskihajonta $\sigma$" , color='y', alpha = 0.3)
     17 # plt.axhline(-hajo, linestyle='--', color='y', alpha = 0.3)

NameError: name 'Kaisa' is not defined
../_images/6be04d7bfe68b0f5561ce430b0a2c0b596ecd9adb611ead9e394dc8913e29b18.png

Entä jos tarkasteltaisiinkin kuukausittaista kehitystä sijaan? Miten tekisit kuvaajan vaikkapa huhtikuiden lämpötiloista Helsingissä? Saisiko sen 1900-luvusta vertailuarvoa mukaan?

4. Tulokset ja johtopäätökset#

Onko maailmanlaajuisessa ja paikallisessa lämpötilakäytöksessä yhteneväisyyksiä? Miksi tai miksei?

Millaisilla asemilla ja menetelmillä tulokset on saatu? Mitä epävarmuustekijöitä niihin liittyy?

Onko poikkeama sinusta suoria lämpötila-arvoja näppärämpi tapa kuvata asioita joissain yhteyksissä?

5. Lähteet#

[1] https://data.unep.org/climate/essential-climate-variables-ecv/global-temperature-change

[2] https://www.ilmatieteenlaitos.fi/havaintojen-lataus