每天凌晨00点00分, 第一时间与你相约
每日英文
I have passed your heart, not I don't want to stay, but you would not shelter.
我曾路过你的心,不是我不想停留,而是你不肯收留。
每日掏心话
你人生中最美妙的组成部分便是由那些零零碎碎的片段串联而成的,那些都是小是细节的美妙之处。
来自:公众号 读芯术 | 责编:乐乐
正文
df.artists.value_counts()
myList =df.artists.value_counts().nlargest(3).index
df_new = df.where(df.artists.isin(myList),other= otherartists )
df_new.artists.value_counts()
A = [ 1, 3, 5, 7, 9 ]
B = [ 4, 5, 6, 7, 8 ]
set(A) - set(B)
import warnings
warnings.filterwarnings(action= ignore )
import keras
map(func,itr)
def product(n1,n2):
return n1 *n2 list1 = (1, 2, 3, 4)
list2 = (10,20,30,40)result = map(product, list1,list2)
list(result)
list1 = (1, 2, 3, 4)
list2 = (10,20,30,40)
result = map(lambda x,y: x * y, list1,list2)
print(list(result))
x = [ 1, 2, 3, 4, 5, 6, 7, 8 ]
x[ 1: 6: 2]
x[::-1]
NAME = [ Sid , John , David ]
BIRD = [ Eagle , Sparrow , Vulture ]
CITY =[ Mumbai , US , London ]for i,(name,bird,city) inenumerate(zip(NAME,BIRD,CITY)):
print(i, represents ,name, , ,bird, and ,city)
df.sample(n=10)
df.sample(frac=0.5).reset_index(drop=True)
def SampleGenerator(n):
yield n
n = n+1
yield n
n = n+1
yield ngen = SampleGenerator(1)
print(next(gen))
print(next(gen))
print(next(gen))
def updatedGenerator(n):
while(1):
yield n
n = n + 1
a = updatedGenerator(1)for i in range(5):
print(next(a))
df = pd.read_csv( artist.csv )
df_new = pd.read_csv( artist.csv ,skiprows=50)df.shape,
df_new.shape
欢迎在留言区留下你的观点,一起讨论提高。如果今天的文章让你有新的启发,学习能力的提升上有新的认识,欢迎转发分享给更多人。
联系客服