A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pandas-dev/pandas/issues/6252 below:

loc indexing when starting with an empty frame · Issue #6252 · pandas-dev/pandas · GitHub

keys1 = ['@' + str(i) for i in range(1000)]
val1 = arange(1000)

keys2 = ['@' + str(i) for i in range(990)]
val2 = arange(990)

allKeys = list(set(keys1).union(keys2))
df = pandas.DataFrame(index = allKeys)
df['A'] = nan
df.loc[keys1, 'A'] = val1

df['B'] = nan
df.loc[keys2, 'B'] = val2

df.head()

## -- End pasted text --
                        <43>
        A    B
@679  679  679
@678  678  678
@337  337  337
@744  744  744
@673  673  673

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4