<SYSTEM_TASK:>
Given the following text problem statement, write Python code to implement the functionality described below in problem statement
<END_TASK>
<USER_TASK:>
Problem:
I am struggling with the basic task of constructing a DataFrame of counts by value from a tuple produced by np.unique(arr, return_counts=True), such as:
<ASSISTANT_TASK:>
Python Code:
import numpy as np
import pandas as pd
np.random.seed(123)
birds = np.random.choice(['African Swallow', 'Dead Parrot', 'Exploding Penguin'], size=int(5e4))
someTuple = np.unique(birds, return_counts=True)
def g(someTuple):
    return pd.DataFrame(np.column_stack(someTuple),columns=['birdType','birdCount'])
result = g(someTuple)
<END_TASK>