Python Bytes: Print DataFrame Index | Data Science
Learn how to print the index of a Pandas DataFrame using Python with an example from the wine dataset. π· #Python #DataScience

AC
2.0K views β’ May 3, 2023

About this video
#Coded by Andrew C
import pandas as pd
from sklearn import datasets
wine_dataset = datasets.load_wine()
wine = pd.DataFrame(wine_dataset.data, columns=wine_dataset.feature_names)
for idx in wine.index:
print(idx, end = '. ')
import pandas as pd
from sklearn import datasets
wine_dataset = datasets.load_wine()
wine = pd.DataFrame(wine_dataset.data, columns=wine_dataset.feature_names)
for idx in wine.index:
print(idx, end = '. ')
Video Information
Views
2.0K
Likes
21
Duration
0:05
Published
May 3, 2023
User Reviews
4.3
(1) Related Trending Topics
LIVE TRENDSRelated trending topics. Click any trend to explore more videos.
No specific trending topics match this video yet.
Explore All Trends