Friday, August 31, 2018

Python: DataFrame2

Basic
Starting out with Python Pandas DataFrames
The Pandas DataFrame – loading, editing, and viewing data in Python

1. head(), tail()
 is it possible mid data, not head or tail?
 df.iloc[[row_start:row_end],[column_start:column_end]]
2. describe()
 separate data each type, and then use the describe() function
3. selecting column
 df.column_name
 df['column_name']
 df.iloc[:, ]
4. selecting row
 df.iloc[0:10, :] - select data first 10 rows.
 df.loc[44, :]
 df[df["Area"] == "Ireland"] – select the rows where Area value is ‘Ireland’.
5. From DataFrame to list values
 df.column_name.values
 df.column_name.tolist()
6. Some columns data
 new = old[['A', 'C', 'D']].copy()
 new = old.filter(['A', 'C', 'D'], axis=1)
 Extracting specific selected columns from a DataFrame to new DataFrame
 * remove column
 new = old.drop('B', axis=1)
7. Change, update index
 df.index = [list_value]

Visualization
Pandas DataFrame Visualization
Data Visualization & Exploration using Pandas Only: Beginner
Modern Pandas (Part 6): Visualization
Visualization with Seaborn
Visualize data with Pandas

Errorbar or box plot, Histogram
Box plot with min, max, average and standard deviation
Python Histograms, Box Plots, & Distributions

Scattering graph
draw box plot & draw all real value (point)
Matplotlib: avoiding overlapping datapoints in a “scatter/dot/beeswarm” plot

Seaborn

DataFrame plot
Understand df.plot in pandas
Data Frames and Plotting
Plotting Series and DataFrame objects

Others
Creating Pandas DataFrames from Lists and Dictionaries
Python에서 데이터 시각화하는 다양한 방법
Create multiple dataframes in loop


Thursday, August 2, 2018

Source Insight - presettings

1. background color
 - Options > Preferences > Colors > Window Background
   [Color...] select color

2. Select Font & Font setting
 - Consolas from Microsoft
   https://www.microsoft.com/en-us/download/details.aspx?id=17879
 - Options > Document Options
   [Screen Fonts...]

3. Disable display formatting
 - Options > Preferences > Basics
   check: Use only color formatting

4. Show right margin: 80 column
 - Options > Document Options > Edition Options
   check: Show right margin

5. Show line number
 - Options > Document Options > Edition Options
   check: Show line number

6. Display full file path in title bar
 - Options > Preference > Display 
    check: Trim Long Path Names With ellipses
   https://stackoverflow.com/questions/8309701/source-insight-is-not-displaying-full-path-of-a-file-in-title-bar

7. add a new keyword, such as "defined"
 - mouse right button click > Keyword List... > Add Word...