๋ฐ์ํ
import numpy as np
from sklearn.datasets import load_iris
import pandas as pd
# Loading irirs dataset
data = load_iris()
df = pd.DataFrame(data.data,
columns = data.feature_names)
display(df)
import numpy as np
from sklearn.datasets import load_iris
import pandas as pd
data = load_iris()
df = pd.DataFrame(data.data,
columns = data.feature_names)
# The scope of these changes made to
# pandas settings are local to with statement.
with pd.option_context('display.max_rows', None,
'display.max_columns', None,
'display.precision', 3,
):
print(df)
import numpy as np
from sklearn.datasets import load_iris
import pandas as pd
data = load_iris()
df = pd.DataFrame(data.data,
columns = data.feature_names)
# Permanently changes the pandas settings
pd.set_option('display.max_rows', None)
pd.set_option('display.max_columns', None)
pd.set_option('display.width', None)
pd.set_option('display.max_colwidth', -1)
# All dataframes hereafter reflect these changes.
display(df)
print('**RESET_OPTIONS**')
# Resets the options
pd.reset_option('all')
display(df)
https://www.geeksforgeeks.org/how-to-print-an-entire-pandas-dataframe-in-python/
๋ฐ์ํ
'Python > Pandas' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[Pandas] Dataframe ์ธ๋ฑ์ค to list ๋ณํ (0) | 2023.10.18 |
---|---|
[Pandas] Dataframe ์์์ ๊ด๋ จ (0) | 2022.10.31 |
[Python] Pandas - Dataframe ํจ์ ๋ชจ์ (0) | 2021.07.26 |
[Python] Pandas - Dataframe for ๋ฌธ ์กฐํ (0) | 2021.02.16 |
[Python] Pandas - DataFrame ์ด์์น ์ ๊ฑฐ (0) | 2020.12.23 |