import pandas as pd
from scipy.stats import pearsonr

# create a sample DataFrame
df = pd.DataFrame({'a': [1, 2, 3, 4], 'b': [5, 6, 7, 8], 'c': [9, 10, 11, 12]})

# define a custom function that computes the correlation between each row and the succeeding row
def row_corr(x):
    return pearsonr(x[:-1], x[1:])[0]

# apply the custom function to each pair of rows
correlations = df.apply(row_corr, axis=1)
print(correlations)