diff --git a/KorAPClient/tests/test_korapclient.py b/KorAPClient/tests/test_korapclient.py
index 2fa9466..1e8c164 100644
--- a/KorAPClient/tests/test_korapclient.py
+++ b/KorAPClient/tests/test_korapclient.py
@@ -13,42 +13,42 @@
 
     def test_frequency_query(self):
         df = self.kcon.frequencyQuery("Ameisenplage")
-        self.assertGreater(df['totalResults'][0], 10)
-        self.assertGreater(10000, df['totalResults'][0])
+        self.assertGreater(df['totalResults'].iloc[0], 10)
+        self.assertGreater(10000, df['totalResults'].iloc[0])
 
     def test_collocation_score_query(self):
         df = self.kcon.collocationScoreQuery("Ameisenplage", "heimgesucht", leftContextSize=0, rightContextSize=1)
-        self.assertEqual(df['rightContextSize'][0], 1)
-        self.assertGreater(df['logDice'][0], 1)
-        self.assertGreater(df['pmi'][0], 10)
-        self.assertLess(df['pmi'][0], 20)
+        self.assertEqual(df['rightContextSize'].iloc[0], 1)
+        self.assertGreater(df['logDice'].iloc[0], 1)
+        self.assertGreater(df['pmi'].iloc[0], 10)
+        self.assertLess(df['pmi'].iloc[0], 20)
 
     def test_collocation_analysis(self):
         df = self.kcon.collocationAnalysis("focus([tt/p=ADJA] {Newstickeritis})", vc="corpusSigle=/W.D17/",
                                            leftContextSize=1, rightContextSize=0,
                                            searchHitsSampleLimit=1, topCollocatesLimit=1,
                                            exactFrequencies=False)
-        self.assertEqual(df['rightContextSize'][0], 0)
-        self.assertGreater(df['O'][0], df['E'][0])
+        self.assertEqual(df['rightContextSize'].iloc[0], 0)
+        self.assertGreater(df['O'].iloc[0], df['E'].iloc[0])
 
     def test_collocation_score_query_multi_collocates(self):
         df = self.kcon.collocationScoreQuery("Ameisenplage", ["einer", "heimgesucht"], leftContextSize=1,
                                              rightContextSize=1)
-        self.assertEqual(df['collocate'][1], 'heimgesucht')
-        self.assertGreater(df['pmi'][1], df['pmi'][0])
+        self.assertEqual(df['collocate'].iloc[1], 'heimgesucht')
+        self.assertGreater(df['pmi'].iloc[1], df['pmi'].iloc[0])
 
     def test_corpus_stats(self):
         df = self.kcon.corpusStats()
-        self.assertGreater(df['tokens'][0], 10 ** 10)
+        self.assertGreater(df['tokens'].iloc[0], 10 ** 10)
 
     def test_corpus_stats_with_vc(self):
-        de_tokens = self.kcon.corpusStats(vc='pubPlaceKey=DE')['tokens'][0]
-        ch_tokens = self.kcon.corpusStats(vc='pubPlaceKey=CH')['tokens'][0]
+        de_tokens = self.kcon.corpusStats(vc='pubPlaceKey=DE')['tokens'].iloc[0]
+        ch_tokens = self.kcon.corpusStats(vc='pubPlaceKey=CH')['tokens'].iloc[0]
         self.assertGreater(de_tokens, ch_tokens)
 
     def test_corpus_stats_with_vc_list(self):
         tokens = self.kcon.corpusStats(vc=['pubPlaceKey=DE', 'pubPlaceKey=CH'])['tokens']
-        self.assertGreater(tokens[0], tokens[1])
+        self.assertGreater(tokens.iloc[0], tokens.iloc[1])
 
 
 if __name__ == '__main__':
