<jupyter_start><jupyter_text>Serieshttps://pandas.pydata.org/docs/reference/api/pandas.Series.html<jupyter_code>s = pd.Series([1,2,3])
s
s.index
s.values<jupyter_output><empty_output><jupyter_text>DataFrame<jupyter_code>np.random.seed(0)
df = pd.DataFrame(
    np.random.randint(10,size=(5,3)),
    columns=list('abc')
    )
df
df.index
df.values
df.columns<jupyter_output><empty_output><jupyter_text>Series - DataFrame<jupyter_code>np.random.seed(0)
df = pd.DataFrame(
    np.random.randint(10,size=(5,3)),
    columns=list('abc')
    )
df
# 按列进行拆分，三个 Series
s1 = df['a']
print(type(s1))
s1
df['b']
df['c']
# 按行进行拆分，5个 Series

s2 = df.loc[0,:]
print(type(s2))
s2
# 设置行索引 [0,1,2,3,4] 值
df.loc[1,:]<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.19257221458046767, 'fraction_numerical': 0.037138927097661624, 'mean_word_length': 6.137254901960785, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '591596', 'license': 'MIT', 'n_tokens_mistral': 361, 'n_tokens_neox': 358, 'n_words': 37, 'path': 'code/001-data-structure.ipynb', 'repo_name': 'liyangbit/PandasLab', 'size': '727'}