Python data analysis practice - use append() to implement dataframe appending dataframe (with source code and implementation effect)

Realize function

Python data analysis practice - use append() to implement dataframe to append dataframe

Implementation code

import pandas as pd

data = pd.DataFrame()
a = [[1, 2, 3], [4, 5, 6]]
data = data.append(a)
a = [[7, 8, 9], [10, 11, 12]]
data = data.append(a)
print(data)

# index不出现重复情况,设置ignore_index=True
data = pd.DataFrame()
a = [[1, 2, 3], [4, 5, 6]]
data = data.append(a, ignore_index=True)
a = [[7, 8, 9], [10, 11, 12]]
data = data.append(a, ignore_index=True)
print(data)

achieve effect

During my postgraduate study, I published 5 papers related to SCI data mining. Now a research institute is engaged in scientific research related to data mining. I have a certain knowledge and understanding of data mining. I will combine my own scientific research practice experience to share from time to time about python machine learning and deep learning. , Basic knowledge and cases of data mining.

Committed to only being original, understanding and learning in the simplest way, pay attention to V subscription number: data miscellaneous forum , contact me for more skills and source code.

Guess you like

Origin blog.csdn.net/sinat_41858359/article/details/130186960