Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- cars = np.array([["Ford", 25, "oct"],["Fiat", 26, "jan"],["Opel", 30, "feb"],["Ford", 50, "may"]]) #definiuje array
- owned_cars_list = [row[0] for row in cars] # pobieram 1 kolumne
- owned_cars_list = list(dict.fromkeys(owned_cars_list)) # usuwam duplikaty
- owned_cars = np.array( owned_cars_list ) #przerabian ba array aby pozniej dodawac nowe wiersze
- print(owned_cars)
- owned_cars[2]= "jaguar1234455" # chce podmienic wartosc ale miesci sie tylko 4 znaki ???
- print(owned_cars)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement