chatviz.load_data.prep_facebook_data

chatviz.load_data.prep_facebook_data(filename)

Processes a Facebook chat file into a neat DataFrame.

Chat history can be downloaded from Facebook as JSON. See here for how to download Facebook chat data in JSON format.

Parameters
filenameUnion[int, str, bytes, PathLike]

The path to the JSON chat file.

Returns
pd.DataFrame

A DataFrame with all of the necessary columns i.e. [‘date’, ‘name’, ‘text’].