80 Câu Hỏi Phỏng Vấn Về Python
80 Câu Hỏi Phỏng Vấn Về Python
80 Câu Hỏi Phỏng Vấn Về Python
28. What are the advantages of NumPy arrays over Python lists?
NumPy is more convenient.
You get a lot of vectors and matrix operations, which sometimes allow one to avoid
unnecessary work.
You get a lot of built-in functions with NumPy for fast searching, basic statistics, linear
algebra, histograms, etc.
41. How do you select both rows and columns from dataframe?
Selecting the first row of ‘description’ column from ‘reviews’ dataframe
reviews[‘description’].iloc[0]
42. How do you select rows based on indices?
Selecting rows 1, 2, 3, 5 and 8 from ‘reviews’ dataframe
indices = [1, 2, 3, 5, 8]
sample_reviews = reviews.loc[indices]