how to get first column in pandas code example
Example 1: get only first 10 columns pandas
df.iloc[:, : 50]
Example 2: pandas print first column
df = pd.DataFrame({"Letters": ["a", "b", "c"], "Numbers": [1, 2, 3]})
first_column = df.iloc[:, 0]
df.iloc[:, : 50]
df = pd.DataFrame({"Letters": ["a", "b", "c"], "Numbers": [1, 2, 3]})
first_column = df.iloc[:, 0]