Your code prints a visual depiction of a matrix without ever actually building a matrix object (except in pieces), so you'd have to write some code to build your matrix first. Looking through your post history, I'm going to try to answer the question that I think you want to ask. For other readers here, please forgive my transgression.
It looks like your real question is something like this:
How do I take this list of dictionaries (data
) and turn it into a bipartite graph?
The easiest way to do that is to transform your data
object into a list of edges and then let networkx handle building the graph. You can iterate through your list of dicts to build an edgelist like this:
edges = [(d.get('title'), tag) for d in data for tag in d.get('tags', '')]
which gives edges
as
[('title1', 'tag1'),
('title1', 'tag2'),
('title1', 'tag3'),
('title2', 'tag1')]
Then you can build and visualize the graph with networkx with G = nx.from_edgelist(edges)
which, when drawn, looks like this:

The full, copy-pasteable code is below. Note that this will not add any 'tag-less' titles to the network if that matters for what you are trying to do. I'll leave it as an exercise for you to figure out how you would build a list of titles without tags and add them to your network with something like G.add_nodes_from()
.
Full code:
import networkx as nx
data = [{"title": "title1", "tags": ["tag1", "tag2", "tag3"]},
{"title": "title2", "tags": ["tag1"]},
{"title": "title3", "tags": []}]
edges = [(d.get('title'), tag) for d in data for tag in d.get('tags', '')]
G = nx.from_edgelist(edges)
top = nx.bipartite.sets(G)[0]
pos = nx.bipartite_layout(G, top)
nx.draw(G, pos, with_labels=True)