Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- matplotlib
- Text Analytics
- line color
- data distribution
- polynomial regression
- multiple lines
- line width
- machine learning
- start exercise
- variables
- AS
- matplotlib.pyplot
- For loops
- MySQL
- self parameter
- PROJECT
- train/test
- continue
- Github
- Text mining
- __init__
- error
- Else
- PANDAS
- SQL
- iterates
- Default X points
- Python
- pie charts
- break
Archives
- Today
- Total
Data Science Explorer
Pandas Read CSV 본문
반응형
CSV files (comma separated files) are used to store big data sets.
Example
Load the CSV into a DataFrame.
import pandas as pd
df = pd.read_csv('data.csv')
print(df.to_string())
** to_string() is to print the entire DataFrame. **
- max_rows
If you want to check your system's max rows with the pd.options.display.max_rows statement.
Example
Check the number of maximum returned rows.
import pandas as pd
print (pd.options.display.max_rows)
** In my system the number 80, which means that if the DataFrame contains more than 80 rows, the pinrt (df) statement will return only the headers and the first and last 5 rows. **
Exercise
Increase the maximum number of rows to display the entire DataFrame:
import pandas as pd
pd.options.display.max_rows = 80
df = pd.read_csv('data.csv')
print(df)
'Python' 카테고리의 다른 글
Pandas: Cleaning Data of Wrong Format (0) | 2023.10.29 |
---|---|
Pandas: Cleaning Empty Cells (2) | 2023.10.29 |
Pandas DataFrames (2) | 2023.10.27 |
Pandas Series (0) | 2023.10.26 |
Pandas (0) | 2023.10.25 |