Problems with importing the ggplot in pandas

I was trying to use the ggplot to generate the plotting of collapsing columns for each step on jupyter notebook. But it always said that “module ‘pandas’ has no attribute 'tslib”.
The ipynb and input datafiles are attached below.

# Load the Pandas libraries with alias 'pd'
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import os
from ggplot import *
# List of all the files
files = filter(os.path.isfile, os.listdir('./'))
file_list = []
# Create a list of all files to process and sort them alphabetically
for doc in files:
    if doc.endswith(".dat"):
        file_list.append(doc)
file_list.sort()
# Iterate through every file to get the 95% of x
#for j in range(10):
for j in range(len(file_list)):
    data = pd.read_csv(file_list[j], header=None,sep='\t')
    g=ggplot(data, aes(x=data[2], y=data[3], size = data[1]))+geom_point(alpha=0.5)
    print(g)

DEM000084.dat (3.6 MB)

ggplot seems to be stagnated in development.

Could you try this instead:

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import os

# List of all the files
files = filter(os.path.isfile, os.listdir('./'))
file_list = []
# Create a list of all files to process and sort them alphabetically
for doc in files:
    if doc.endswith(".dat"):
        file_list.append(doc)
file_list.sort()
# Iterate through every file to get the 95% of x
#for j in range(10):
for j in range(len(file_list)):
    data = pd.read_csv(file_list[j], header=None,sep='\t')
    
    # create data
    x = data[2]
    y = data[3]
    z = data[1]
 
    # Change color with number of contacts and alpha
    #
    plt.figure(figsize=(20, 4))
    plt.scatter(x, y, s=z*10000, c=data[4], alpha=0.4)
    

Please replace c = data[4] with number of contacts.