Professional Documents
Culture Documents
17 Dsinterviewquestions
17 Dsinterviewquestions
17 Dsinterviewquestions
Here, the keys include name, age, and films. As you can
see, the corresponding values can be of different data
types, including numbers, strings, and lists. Notice how the
value 50 is accessed via the corresponding key age.
def main():
SELECT
x,y =2,8id,
first_name,
if(x < y):
last_name,
st=”x is less than y”
FROM customer
print(st)
ORDER BY last_name DESC;
if __name__ == ”__main__”:
main()
25
[1,16]
list = [2, 5, 4, 7, 5, 6, 9]
print SELECT
(list[-1]) id,
first_name,
9
last_name,
FROM customer
text = "I love data science"
print ORDER BY last_name DESC;
(text[-3])
employees.isna()
employees.isna()
employees.info()
SELECT id,
RangeIndex: 100 entries, 0 to 99
first_name,
Data columns (totas 3 columns):
last_name,
ID 100 non-null int64
FROM customer
Department 92 non-null object
Age ORDER BY last_name
94 non-null float64 DESC;
dtypes: float64(1), int64(1), object(1)
memory usage: 2.4+ KB
employees[['Department', 'Age']]
employees['Active']
employees.isna() = 1
employees.head()
employees[['Department', 'Age']]