Skip to content

Instantly share code, notes, and snippets.

Avatar

Sırat Semih Çöp s1rat-dev

View GitHub Profile
@s1rat-dev
s1rat-dev / Matplotlip Grafik Türleri.ipynb
Last active Mar 2, 2021
[PYTHON] Matplotlib modülünde başlıca yer alan grafikler ve bu grafiklerin kullanımı.
View Matplotlip Grafik Türleri.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@s1rat-dev
s1rat-dev / Matplotlib.ipynb
Last active Mar 1, 2021
[PYTHON] Matplotlib modülü ile verileri grafik haline getirme ve Matplotlib'in kısaca kullanımı.
View Matplotlib.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@s1rat-dev
s1rat-dev / dataframe youtube.py
Created Feb 27, 2021
[PYTHON] Pandas konusunun anlaşılabilirliği adına 15 soruluk örnek ve çözümleri.
View dataframe youtube.py
import pandas as pd
data = pd.read_csv('GBvideos.csv')
df = pd.DataFrame(data)
##################################################################################
# 1- İlk on kaydı getirin.
result = df.head(10)
@s1rat-dev
s1rat-dev / pandas dataframe nba_Players.csv
Created Feb 27, 2021
[PYTHON] Pandas konularının anlaşılabilirliği için 11 soruluk örnek ve çözümleri.
View pandas dataframe nba_Players.csv
Player height weight collage born birth_city birth_state
0 Curly Armstrong 180 77 Indiana University 1918
1 Cliff Barker 188 83 University of Kentucky 1921 Yorktown Indiana
2 Leo Barnhorst 193 86 University of Notre Dame 1924
3 Ed Bartels 196 88 North Carolina State University 1925
4 Ralph Beard 178 79 University of Kentucky 1927 Hardinsburg Kentucky
5 Gene Berce 180 79 Marquette University 1926
6 Charlie Black 196 90 University of Kansas 1921 Arco Idaho
7 Nelson Bobb 183 77 Temple University 1924 Philadelphia Pennsylvania
8 Jake Bornheimer 196 90 Muhlenberg College 1927 New Brunswick New Jersey
@s1rat-dev
s1rat-dev / pandas dataframe methods.py
Created Feb 26, 2021
[PYTHON] Pandas DataFrame methodlarının (unique,nunique,sort,pivot_table vs.) incelenmesi.
View pandas dataframe methods.py
import pandas as pd
import numpy as np
data = {
'Column1': [1,2,3,4,5,6],
'Column2': [10,20,13,20,25,-3],
'Column3': ['abc','bca','ade','cba','dea','cbea']
}
@s1rat-dev
s1rat-dev / pandas merge join.py
Created Feb 25, 2021
[PYTHON] Pandas ile veri birleştirme, inner, left, right ve outer join formülleri ve 'concat' kavramı.
View pandas merge join.py
import pandas as pd
customers = {
'customerID': [1,2,3,4],
'firstName': ['Ahmet','Ali','Hasan','Canan'],
'lastName' : ['Yılmaz','Korkmaz','Çelik','Toprak'],
}
@s1rat-dev
s1rat-dev / pandas string function.py
Created Feb 25, 2021
[PYTHON] Pandas ile string fonksiyonlarının kullanımı, stringe özgü fonksiyonların yazımı, expand ve astype kullanımı.
View pandas string function.py
import pandas as pd
#############################################################################
## ##
## ##
## STRING FUNCTIONS IN PANDAS ##
## ##
## ##
#############################################################################
@s1rat-dev
s1rat-dev / kayip ve bozuk veri analizi.py
Created Feb 24, 2021
[PYTHON] Kayıp veya bozuk veri analizi üzerine işlemler, (isnull,notnull,drop,dropna,fillna)
View kayip ve bozuk veri analizi.py
import pandas as pd
import numpy as np
data = np.random.randint(10,100,15).reshape(5,3)
df = pd.DataFrame(data,index=['a','c','e','f','h'],columns=['Column1','Column2','Column3'])
df = df.reindex( ['a','b','c','d','e','f','g','h'])
newColumn = [np.nan,30,np.nan,51,np.nan,30,np.nan,10]
@s1rat-dev
s1rat-dev / pandas groupby.py
Created Feb 23, 2021
{PYTHON] Pandas GroupBy başlıca özellikleri ve kullanımı.
View pandas groupby.py
import pandas as pd
import numpy as np
data = {
'Çalışan': ['Ahmet Yılmaz','Can Ertürk','Hasan Korkmaz','Cenk Saymaz','Ali Turan','Rıza Ertürk','Mustafa Can'],
'Departman': ['İnsan Kaynakları','Bilgi İşlem','Muhasebe','İnsan Kaynakları','Bilgi İşlem','Muhasebe','Bilgi İşlem'],
'Yaş': [30,25,45,50,23,34,42],
'Semt': ['Kadıköy','Tuzla','Maltepe','Tuzla','Kadıköy','Tuzla','Maltepe'],
'Maaş': [5000,3000,4000,3500,2750,6500,4500]
}
@s1rat-dev
s1rat-dev / working on dataframes.py
Created Feb 23, 2021
[PYTHON] Pandas, Dataframe olayı ile ilgili, kolon ve satırların seçilmesi, ve her hangi bir kolonun silinme işlemi.
View working on dataframes.py
import pandas as pd
from numpy.random import randn
df = pd.DataFrame(randn(3,3), index=['A','B','C'], columns=['Column1','Column2','Column3'])
result = df
#################
# SELECT COLUMN #
#################