I have a page that has Auction details I like to extract. The data from these tables changes in size because there are times that not all data points are available. Is there a way to create missing columns even if they are missing in order to keep the table consistent.
This is an example of a table that has some data points missing
<div class="AUCTION_DETAILS">
<table class="ad_tab" tabindex="0">
<tbody>
<tr>
<th class="AD_LBL" scope="row">Auction Type:</th>
<td class="AD_DTA">FORECLOSURE</td>
</tr>
<tr>
<th class="AD_LBL" scope="row" aria-label="Case Number">Case #:</th>
<td class="AD_DTA"><a
href="/index.cfm?zaction=auction&zmethod=details&AID=1173868&bypassPage=1">2009-020878-CA-01</a>
</td>
</tr>
<tr>
<th class="AD_LBL" scope="row">Final Judgment Amount:</th>
<td class="AD_DTA">$183,284.23</td>
</tr>
<tr>
<th class="AD_LBL" scope="row">Parcel ID:</th>
<td class="AD_DTA"></td>
</tr>
<tr>
<th class="AD_LBL" scope="row">Plaintiff Max Bid:</th>
<td class="AD_DTA ASTAT_MSGPB">Hidden</td>
</tr>
</tbody>
</table>
</div>
This is an example of a table that has all the data points
<div class="AUCTION_DETAILS">
<table class="ad_tab" tabindex="0">
<tbody>
<tr>
<th class="AD_LBL" scope="row">Auction Type:</th>
<td class="AD_DTA">FORECLOSURE</td>
</tr>
<tr>
<th class="AD_LBL" scope="row" aria-label="Case Number">Case #:</th>
<td class="AD_DTA"><a
href="/index.cfm?zaction=auction&zmethod=details&AID=1312124&bypassPage=1">2013-037297-CA-01</a>
</td>
</tr>
<tr>
<th class="AD_LBL" scope="row">Final Judgment Amount:</th>
<td class="AD_DTA">$242,181.24</td>
</tr>
<tr>
<th class="AD_LBL" scope="row">Parcel ID:</th>
<td class="AD_DTA">04-3106-030-0070</td>
</tr>
<tr>
<th class="AD_LBL" scope="row">Property Address:</th>
<td class="AD_DTA">131 W 41 ST</td>
</tr>
<tr>
<th class="AD_LBL" scope="row"></th>
<td class="AD_DTA">HIALEAH, FL- 33012</td>
</tr>
<tr>
<th class="AD_LBL" scope="row">Assessed Value:</th>
<td class="AD_DTA">$201,701.00</td>
</tr>
<tr>
<th class="AD_LBL" scope="row">Plaintiff Max Bid:</th>
<td class="AD_DTA ASTAT_MSGPB">Hidden</td>
</tr>
</tbody>
</table>
</div>
The short table is missing all the fields below in this example. But that may vary PropertyAddress, PropertyAddress1, AssessedValue, PlaintiffMaxBid
How would I extract existing columns and create NaN columns for the missing columns so table size is consistent.
Below are 2 samples one that has all data points and an other that has missing data points