[Pandas][DataFrame][concat]S3_02_concatenation_with_multi_indexing
In [1]: import pandas as pd In [2]: raw_data = {'Bank Client ID': ['1', '2', '3', '4', '5'], 'First Name': ['Robert', 'Benedict', 'Mark', 'Tom', 'Ryan'], 'Last Name': ['Downey', 'Cumberbatch', 'Ruffalo', 'Holland', 'Reynolds']} bank1_df = pd.DataFrame(raw_data, columns = ['Bank Client ID', 'First Name', 'Last Name']) In [3]: raw_data = {'Bank Client ID': ['6', '7', '8', '9', '10'], 'First Name':..
2023. 1. 21.
[Pandas][DataFrame][concat]S3_01_concatenation
In [1]: import pandas as pd https://pandas.pydata.org/pandas-docs/stable/user_guide/merging.html In [2]: raw_data = {'Bank Client ID': ['1', '2', '3', '4', '5'], 'First Name': ['Robert', 'Benedict', 'Mark', 'Tom', 'Ryan'], 'Last Name': ['Downey', 'Cumberbatch', 'Ruffalo', 'Holland', 'Reynolds']} bank1_df = pd.DataFrame(raw_data, columns = ['Bank Client ID', 'First Name', 'Last Name']) bank1_df O..
2023. 1. 21.
[Pandas][DaraFrame]S2_01_DataFrame
In [1]: import pandas as pd In [3]: # data client_df = pd.DataFrame({'Client ID':[111, 112, 113, 114], 'Client Name':['Michael','Donald','John','Matthew'], 'Net Worth[$]': [3000, 40000, 100000, 15000], 'Years': [5, 9, 10, 12]}) client_df Out[3]: Client ID Client Name Net Worth[$] Years 0 111 Michael 3000 5 1 112 Donald 40000 9 2 113 John 100000 10 3 114 Matthew 15000 12 In [4]: # the data type t..
2023. 1. 17.