1
+ """
2
+ 1 - veri isimli bir klasör oluşturun
3
+ 2 - zip dsosyasını veri klasörüne çıkartın
4
+ 3 - zip dosyası içindeki csv dosyalarının tüm içeriğini
5
+ tek bir csv dosyasında birleştirin
6
+ volume olmasın
7
+ 4 - bu kayıtların tamamını sqlite veritabanına bir tablo
8
+ oluşturarak yükleyin
9
+ 5 - kullanıcının belirlediği paritenin
10
+ kullanıcının belirlediği aralığının
11
+ kullanıcının belirlediği değerin
12
+ grafiğini çizdirin (veriler sqlite tan çekilecek).
13
+ """
14
+ import os
15
+ import zipfile
16
+ import pandas as pd
17
+ import sqlite3
18
+ import matplotlib .pyplot as plt
19
+
20
+ bag = sqlite3 .connect ("kripto.vt" )
21
+ cursor = bag .cursor ()
22
+
23
+
24
+ parite = "AVAXUSDT" # input("Parite Giriniz :")
25
+ begin_date = "2022年02月03日" # input("Başlangıç Tarihi :")
26
+ finish_date = "2022年02月04日" # input("Bitiş Tarihi :")
27
+
28
+ sorgu = "SELECT * FROM parite WHERE " \
29
+ "(otime BETWEEN '" + begin_date + "' " \
30
+ "AND '" + finish_date + "') " \
31
+ "AND parite='" + parite + "'"
32
+ cursor .execute (sorgu )
33
+ conclusion = cursor .fetchall ()
34
+ liste_a = []
35
+ liste_b = []
36
+ for mum in conclusion :
37
+ #print(mum)
38
+ #print(mum[1])
39
+ liste_b .append (mum [6 ])
40
+ liste_a .append (mum [2 ])
41
+
42
+ plt .plot (liste_a , liste_b )
43
+ plt .show ()
44
+ bag .close ()
0 commit comments