Question: ```
SELECT
    player.FirstName,
    player.LastName,
    team.teamName,
    TotalPoints,
    TotalRebounds,
    TotalAssists,
    TotalSteals,
    TotalBlocks
FROM playerstats
INNER JOIN player
    ON playerstats.PlayerID = player.PlayerID

```

I have a table called player (Player ID, firstname, lastname, team ID)
table called Team (teamID, teamName). I have a table called playerstat(which has playerID)

I want to list firstname, last name and team along with total points, rebounds, etc

I want to use the playerID to get the team Id then list the team name ... if that makes sense. Not sure how to do that.

Answer: 
There's no built-in function for this, but you can easily create one yourself:

```
def chop(expr, *, max=0.3):
    return [i if i > max else 0 for i in expr]

```

Calling this would convert all numbers less than or equal to `0.3` to a `0`:

```
>>> chop([1.0, 0.2, 0.4, 0.3, 0.31])
[1.0, 0, 0.4, 0, 0.31]

```

You should change the default value of `max` to something that suits your needs better, but you can always change it separately for individual calls too:

```
>>> chop([0.2, 0.3, 0.4], max=0.25)
[0, 0.3, 0.4]
>>> chop([0.3, 1, 2, 3], max=2)
[0, 0, 0, 3]

```

And if you want, you can convert negative numbers too! Either using the same distance from zero for both positive and negative numbers:

```
def chop(expr, *, max=0.3):
    return [i if abs(i) > max else 0 for i in expr]

```

Or by using two different limits:

```
def chop(expr, *, max=0.3, min=-0.3):
    if max < min:
        raise ValueError
    return [
        i if i > max or i < min else 0
        for i in expr
    ]

```
One way to do that with numpy would be to use a masked array:

```
>>> import numpy
>>> def chop(expr, delta=10**-10):
...     return numpy.ma.masked_inside(expr, -delta, delta).filled(0)

>>> x = numpy.fft.irfft(numpy.fft.rfft([2, 1, 1, 0, 0, 0]))

>>> x
array([  2.00000000e+00,   1.00000000e+00,   1.00000000e+00,
         3.20493781e-17,  -4.44089210e-16,  -3.20493781e-17])

>>> chop(x)
array([ 2.,  1.,  1.,  0.,  0.,  0.])

```

If you really don't want to use numpy for some reason, then here's a function that works for scalar values, lists and multidimensional lists (matrices):

```
def chop(expr, delta=10**-10):
    if isinstance(expr, (int, float, complex)):
        return 0 if -delta <= expr <= delta else expr
    else:
        return [chop(x) for x in expr]

```