import pandas as pd df = pd.DataFrame({"A":[1,4], "B":[2,5], "C":[3,6]}) print(df) # A B C # 0 1 2 3 # 1 4 5 6
print(df.to_numpy()) # [[1 2 3] # [4 5 6]]
print(df.values) # [[1 2 3] # [4 5 6]]